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

Added NoticeServerTimeStamp for reporting server side timestamp from the handshake

Eugene Fryntov 8 лет назад
Родитель
Сommit
9580d35781
2 измененных файлов с 6 добавлено и 0 удалено
  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)
 	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 {
 type repetitiveNoticeState struct {
 	message string
 	message string
 	repeats int
 	repeats int

+ 1 - 0
psiphon/serverApi.go

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