Skip to content
Snippets Groups Projects
Commit a03f3a83 authored by rswindell's avatar rswindell
Browse files

Handles failure to bind any service sockets gracefully.

parent 75815f9e
No related branches found
No related tags found
No related merge requests found
......@@ -985,6 +985,7 @@ void DLLCALL services_thread(void* arg)
time_t initialized;
fd_set socket_set;
SOCKET high_socket;
ulong total_sockets;
struct timeval tv;
service_client_t* client;
......@@ -1083,6 +1084,7 @@ void DLLCALL services_thread(void* arg)
}
/* Open and Bind Listening Sockets */
total_sockets=0;
for(i=0;i<(int)services;i++) {
service[i].socket=INVALID_SOCKET;
......@@ -1116,6 +1118,13 @@ void DLLCALL services_thread(void* arg)
continue;
}
service[i].socket=socket;
total_sockets++;
}
if(!total_sockets) {
lprintf("0000 !No service sockets bound");
cleanup(1);
return;
}
if(startup->setuid!=NULL)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment