--- projects/cms/source/host/winhost/nettest.frm 2001/03/14 10:47:26 1.33 +++ projects/cms/source/host/winhost/nettest.frm 2001/03/19 09:35:56 1.35 @@ -154,6 +154,7 @@ Dim TCPUpdateTime As Integer Dim protocolVersion As String Dim connected As Boolean +Dim heartBeating As Boolean Dim CUpTime As New CUpTime Dim wksta As New CNetWksta @@ -249,15 +250,16 @@ Private Sub Hide_Click() SystemTray.Icon = Val(Form1.Icon) End Sub -Private Sub Image1_Click() -End Sub - Private Sub Reconfigure_Click() ' establish a TCP connection to a filtermanager - connected = False - TCPSock.Close - TCPSock.Connect filterManagerHostname, filterManagerTCPPort + If Not heartBeating Then + connected = False + TCPSock.Close + TCPSock.Connect filterManagerHostname, filterManagerTCPPort + Else + Status.Caption = "Cannot reconfigure while heartbeating" + End If End Sub @@ -363,6 +365,7 @@ Private Sub TCPSock_DataArrival(ByVal bytesTotal As Lo End Select Else ' Perform a heartbeat (1.1) + heartBeating = True On Error GoTo heartbeatError Select Case responseNumber Case 1: @@ -379,7 +382,10 @@ Private Sub TCPSock_DataArrival(ByVal bytesTotal As Lo Text1.Text = Text1.Text & response & vbCrLf TCPSock.SendData lastModified & vbCrLf Case 4: - If Not response = "OK" Then GoTo heartbeatError + If Not response = "OK" Then + heartBeating = False + Reconfigure_Click + End If Text1.Text = Text1.Text & response & vbCrLf TCPSock.SendData "ENDHEARTBEAT" & vbCrLf Case 5: @@ -395,9 +401,11 @@ Private Sub TCPSock_DataArrival(ByVal bytesTotal As Lo Exit Sub configError: + heartBeating = False Status.Caption = "FAILED to get configuration from the server" Exit Sub heartbeatError: + heartBeating = False Status.Caption = "Heatbeat FAILED" Exit Sub End Sub @@ -481,11 +489,10 @@ Private Sub Timer1_Timer() "" & _ "" & netbiosName & "" & _ "" & osName & "" & _ - "" & osVersionMajor & "" & _ + "" & osVersionMajor & "." & osVersionMinor & "" & _ "" & osBuild & "" & _ "" & osName & "" & _ - "" & osVersionMinor & "" & _ - "" & processorType & "" & _ + "" & processorType & "" & _ "" & uptime & "" & _ "" & _ "" & userCount & "" & _