Procházet zdrojové kódy

Fix: format specifier and variadic arg issues

Rod Hynes před 7 roky
rodič
revize
d95c10c961
2 změnil soubory, kde provedl 4 přidání a 4 odebrání
  1. 1 1
      psiphon/controller.go
  2. 3 3
      psiphon/notice.go

+ 1 - 1
psiphon/controller.go

@@ -643,7 +643,7 @@ loop:
 					// calls registerTunnel -- and after checking numTunnels; so failure is not
 					// calls registerTunnel -- and after checking numTunnels; so failure is not
 					// expected.
 					// expected.
 					if !controller.registerTunnel(connectedTunnel) {
 					if !controller.registerTunnel(connectedTunnel) {
-						NoticeAlert("failed to register %s: %s", connectedTunnel.serverEntry.IpAddress)
+						NoticeAlert("failed to register %s: %s", connectedTunnel.serverEntry.IpAddress, err)
 						discardTunnel = true
 						discardTunnel = true
 					}
 					}
 				}
 				}

+ 3 - 3
psiphon/notice.go

@@ -950,13 +950,13 @@ func (context *commonLogContext) Debug(args ...interface{}) {
 }
 }
 
 
 func (context *commonLogContext) Info(args ...interface{}) {
 func (context *commonLogContext) Info(args ...interface{}) {
-	context.outputNotice("Info", args)
+	context.outputNotice("Info", args...)
 }
 }
 
 
 func (context *commonLogContext) Warning(args ...interface{}) {
 func (context *commonLogContext) Warning(args ...interface{}) {
-	context.outputNotice("Alert", args)
+	context.outputNotice("Alert", args...)
 }
 }
 
 
 func (context *commonLogContext) Error(args ...interface{}) {
 func (context *commonLogContext) Error(args ...interface{}) {
-	context.outputNotice("Error", args)
+	context.outputNotice("Error", args...)
 }
 }