OSDN Git Service

cvs reset
[opengate/opengate.git] / opengate / opengatesrv / main.c
index c7d6d60..b2e8f5e 100644 (file)
@@ -63,8 +63,8 @@ int  main(int argc, char **argv)
   int pid;
   int parentpid;
   int duration;     /* requested usage duration */
+  int durationEntered; /* the duration value is entered or not */
   int authResult;
-  char watchMode[WORDMAXLN];  /* client watch mode Http or Java or Timeout */
 
   /* get time at the cgi starting (in msec) */
   gettimeofday(&timeBeginCgi, NULL) ;
@@ -89,7 +89,7 @@ int  main(int argc, char **argv)
   }
 
   /* get POST data */
-  if(GetPostData(userid, password, clientAddr4, &duration, watchMode)==FALSE){
+  if(GetPostData(userid, password, clientAddr4, &duration, &durationEntered)==FALSE){
     PutClientRetry(language);
     return 0;
   }
@@ -169,7 +169,7 @@ int  main(int argc, char **argv)
   if(pid!=0){
     /** parent process **/
     /* send accept page with java */
-    PutClientAccept(userid, sessionId, port, pid, clientAddr4, clientAddr6, ipStatus, duration, watchMode);
+    PutClientAccept(userid, sessionId, port, pid, clientAddr4, clientAddr6, ipStatus, duration, durationEntered);
 
     /* detach from Web server */
     return 0;
@@ -324,7 +324,7 @@ void logConnectMode()
     time3usec += 1000000; time3sec--;
   }
 
-  if(debug>0) err_msg("INFO: user=%s watchmode=%s procsec=%ld.%ld,%ld.%ld,%ld.%ld ipversion=%d useragent=%s",
+  if(debug>0) err_msg("INFO: user=%s watchmode=%s procsec=%ld.%06ld,%ld.%06ld,%ld.%06ld ipversion=%d useragent=%s",
                      userid, mode[connectionMode], 
                      time1sec,time1usec,
                      time2sec,time2usec,