OSDN Git Service

Ver.1.5.12: Fixed error on reconnecting.
authorwatanaby <>
Thu, 16 Jun 2011 07:41:19 +0000 (07:41 +0000)
committerwatanaby <>
Thu, 16 Jun 2011 07:41:19 +0000 (07:41 +0000)
opengate/doc/Changes.html
opengate/opengatesrv/watch-client.c

index 9ca64e1..f49b7bb 100644 (file)
@@ -679,6 +679,10 @@ Opengate History</H3>
        Ver.1.5.11 at 2011.5.27
        </DT><DD>
         Fixed error on requesting favicon [contributed by S.Horikawa]. 
+       </DD><DT>
+       Ver.1.5.12 at 2011.6.16
+       </DT><DD>
+        Fixed error on reconnecting [contributed by S.Horikawa]. 
        </DD>
        </DL>
 <P>
index f5745e0..fb2e5a6 100644 (file)
@@ -602,11 +602,16 @@ void acceptHttpReConnect(void){
   /* connection wait */
   connfd = SelectAccept();
 
-  if(connfd<0) connectMode=ENDCONNECT; /* timeout or abnormal */
-  else         connectMode=HTTPCONNECT; /* reconnected */
-
   /* receive request */
   RemoveAlarm("ReadWaitAlarm");
+
+  if(connfd<0){  /* timeout or abnormal */
+    connectMode=ENDCONNECT;
+  }else{         /* reconnected */
+    connectMode=HTTPCONNECT;
+    RemoveAlarm("CheckHttpAlarm");
+    AddAlarm("CheckHttpAlarm", alarmArg.checkInterval, FALSE, OnCheckHttpAlarm);
+  }
 }
 
 /*****************************************************************/