From 703cf3668ed5bad427aee9b3bcb672a643d3f928 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 26 May 2019 01:05:28 -0700 Subject: [PATCH] fixes for the protobuf changes Signed-off-by: Jeff Carr --- main.go | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 3fab52a..012436e 100644 --- a/main.go +++ b/main.go @@ -44,6 +44,9 @@ var BUILDTIME string // this is passed in as an ldflag // https://github.com/coredns/coredns/tree/master/plugin/tls // https://github.com/coredns/coredns/blob/master/pb/dns.proto +// cross platform openvpn that may work for IPv6 +// https://github.com/mysteriumnetwork/go-openvpnwe + func onExit(err error) { log.Println("Sleep for 1 second") time.Sleep(1 * 1000 * 1000 * 1000) @@ -235,8 +238,8 @@ func mainMouseClick(b *gui.ButtonMap) { msg := "On account " + b.Account.Nick + "\n" msg += "pb.Comment = " + currentMessage.Comment + "\n" msg += "pb.Id = " + fmt.Sprintf("%d", currentMessage.Id) + "\n" - msg += "pb.Email = " + currentMessage.Email + "\n" - msg += "pb.Username = " + currentMessage.Username + "\n" + msg += "pb.Email = " + b.Account.Email + "\n" + msg += "pb.Username = " + b.Account.Username + "\n" gui.ErrorWindow("Login Failed", msg) } currentMessage = nil @@ -303,12 +306,21 @@ func mainMouseClick(b *gui.ButtonMap) { } func prepareAndSend(event *pb.Event) { + /* + // This is sent in the Account now if (gui.Data.Current != nil) { event.Token = gui.Data.Current.Token event.Username = gui.Data.Current.Username event.Password = gui.Data.Current.Password } - log.Println("\tmain.prepareAndSend() event.Token =", event.Token) + */ + if (event.Account == nil) { + log.Println("\tmain.prepareAndSend() ERROR event.Token = nil") + log.Println("\tmain.prepareAndSend() ERROR event.Token = nil") + log.Println("\tmain.prepareAndSend() ERROR event.Token = nil") + } else { + log.Println("\tmain.prepareAndSend() event.Token =", event.Account.Token) + } gorillaSendProtobuf(event) gui.Data.State = "READ PROTOBUF" }