X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=server%2Fmain.c;h=0a39ae9c7da4370e3f31b90c5a7d3727b052faf1;hb=f6f1a6d46c477dcc7f255d5e88a3dacd70301312;hp=7933bab7c3394b60f07746fdec199e143dc2ed57;hpb=e3e7914fe2f59765e5f92371329652a02518928c;p=matches%2FMCTX3420.git diff --git a/server/main.c b/server/main.c index 7933bab..0a39ae9 100644 --- a/server/main.c +++ b/server/main.c @@ -37,7 +37,7 @@ void ParseArguments(int argc, char ** argv) if (getcwd(g_options.root_dir, sizeof(g_options.root_dir)) == NULL) Fatal("Couldn't get current working directory - %s", strerror(errno)); - gettimeofday(&(g_options.start_time), NULL); // Start time + clock_gettime(CLOCK_MONOTONIC, &(g_options.start_time)); // Start time g_options.auth_method = AUTH_NONE; // Don't use authentication @@ -133,19 +133,19 @@ int main(int argc, char ** argv) Pin_Init(); // Try and start things - /* + const char *ret; if ((ret = Control_SetMode(CONTROL_START, "test")) != NULL) Fatal("Control_SetMode failed with '%s'", ret); - */ + // run request thread in the main thread FCGI_RequestLoop(NULL); - /* + if ((ret = Control_SetMode(CONTROL_STOP, "test")) != NULL) Fatal("Control_SetMode failed with '%s'", ret); - */ + //Sensor_StopAll(); //Actuator_StopAll();