Просмотр исходного кода

Fix: format specifier and variadic arg issues

Rod Hynes 7 лет назад
Родитель
Сommit
d95c10c961
2 измененных файлов с 4 добавлено и 4 удалено
  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
 					// expected.
 					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
 					}
 				}

+ 3 - 3
psiphon/notice.go

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