Measure system

Dependencies:   EthernetNetIf mbed RF12B

Revision:
1:b26ab2467b1a
Parent:
0:8d62137f7ff4
Child:
2:afe5826411e3
--- a/server/HTTPServer.cpp	Thu Mar 03 08:45:49 2011 +0000
+++ b/server/HTTPServer.cpp	Thu Mar 10 19:56:45 2011 +0000
@@ -62,13 +62,6 @@
 
   printf("0-TCP-HTTPServer::onTCPSocketEvent : Event %d\r\n", e);
     
-    ctTime = time(NULL);
-    ctTime += (clockoffset*3600);
-    strftime(buf,sizeof(buf), "%Y/%m/%d %H:%M:%S", localtime(&ctTime));
-    tempstring ="";
-    tempstring +="TCP-Con: ";
-    tempstring += buf;
-    LogWrite(tempstring);
 
   if(e==TCPSOCKET_ACCEPT)
   {
@@ -87,6 +80,15 @@
  return;
 }
    
+   char buf[40];
+   string tempstring ("");
+       ctTime = time(NULL);
+    ctTime += (clockoffset*3600);
+    strftime(buf,sizeof(buf), "%Y/%m/%d %H:%M:%S", localtime(&ctTime));
+    tempstring +="TCP-Con: ";
+    tempstring += buf;
+    LogWrite(tempstring);
+   
     HandlerActive = true;
     HTTPRequestDispatcher* pDispatcher = new HTTPRequestDispatcher(this, pTCPSocket); //TCPSocket ownership is passed to dispatcher
     //The dispatcher object will destroy itself when done, or will be destroyed on Server destruction