fixes for the protobuf changes

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2019-05-26 01:05:28 -07:00
parent 480768e33e
commit 703cf3668e
1 changed files with 15 additions and 3 deletions

18
main.go
View File

@ -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"
}