Browse Source

Added NoticeServerTimeStamp for reporting server side timestamp from the handshake

Eugene Fryntov 8 years ago
parent
commit
9580d35781
2 changed files with 6 additions and 0 deletions
  1. 5 0
      psiphon/notice.go
  2. 1 0
      psiphon/serverApi.go

+ 5 - 0
psiphon/notice.go

@@ -416,6 +416,11 @@ func NoticeSLOKSeeded(slokID string, duplicate bool) {
 	outputNotice("SLOKSeeded", noticeIsDiagnostic, "slokID", slokID, "duplicate", duplicate)
 }
 
+// NoticeServerTimeStamp reports server side timestamp seen in the handshake
+func NoticeServerTimeStamp(serverTimestamp string) {
+	outputNotice("ServerTimeStamp", 0, "timestamp", serverTimestamp)
+}
+
 type repetitiveNoticeState struct {
 	message string
 	repeats int

+ 1 - 0
psiphon/serverApi.go

@@ -244,6 +244,7 @@ func (serverContext *ServerContext) doHandshakeRequest(
 	}
 
 	serverContext.serverHandshakeTimestamp = handshakeResponse.ServerTimestamp
+	NoticeServerTimeStamp(serverContext.serverHandshakeTimestamp)
 
 	return nil
 }