if(rand() % 3 == 0) {
logger(LOG_ERR, "Shutting down, check configuration of all nodes for duplicate Names!");
- abort();
+ running = false;
return;
}
if(!read_server_config()) {
logger(LOG_ERR, "Unable to reread configuration file, exitting.");
- abort();
+ running = false;
return EINVAL;
}
event_add(&timeout_event);
-
- while(true) {
+ while(running) {
mutex_unlock(&mutex);
usleep(1000000);
mutex_lock(&mutex);
return ERROR_CALL_NOT_IMPLEMENTED;
}
- abort();
+ running = false;
status.dwWaitHint = 30000;
status.dwCurrentState = SERVICE_STOP_PENDING;
SetServiceStatus(statushandle, &status);