#include <time.h>
#include <libintl.h>
+#include "stg/common.h"
+#include "stg/ia.h"
#include "web.h"
-#include "common.h"
-#include "ia_auth_c.h"
extern WEB * web;
extern IA_CLIENT_PROT * clnp;
dirName[i] = "-";
refreshPeriod = 5;
+
+memset(&ls, 0, sizeof(ls));
}
//---------------------------------------------------------------------------
void WEB::Start()
listenAddr.sin_port = htons(LISTEN_PORT);
listenAddr.sin_addr.s_addr = listenWebAddr;
-int lng = 1;
-
#ifndef WIN32
+int lng = 1;
if (0 != setsockopt(listenSocket, SOL_SOCKET, SO_REUSEADDR, &lng, 4))
{
printf("Setsockopt Fail\n");
#ifdef WIN32
Sleep(1000);
#else
- usleep(1000000);
+ struct timespec ts = {1, 0};
+ nanosleep(&ts, NULL);
#endif
exit(0);
}