added "first time" configuration (set up first bot and admin user)
[NeonServV5.git] / src / ClientSocket.c
index 6d2c34e5d20efe744237d1d6b3fab270a15c7607..ad634dc4408388a28fa301de24d5c7bb17e8c2ab 100644 (file)
@@ -418,8 +418,8 @@ int clientsocket_parseorder_top(unsigned int tid) {
 }
 #endif
 
-void socket_loop(int timeout_seconds) {
-    if(sockets == NULL) return;
+int socket_loop(int timeout_seconds) {
+    if(sockets == NULL) return 0;
     int is_synchronized = 1;
     SYNCHRONIZE(synchronized_recv);
     fd_set fds;
@@ -439,7 +439,7 @@ void socket_loop(int timeout_seconds) {
     ret = select(ret + 1, &fds, NULL, NULL, &timeout);
     if(ret == 0) {
         DESYNCHRONIZE(synchronized_recv);
-        return;
+        return 1;
     }
     for (sock = sockets->data; sock; sock = next) {
         next = sock->next;
@@ -530,6 +530,7 @@ void socket_loop(int timeout_seconds) {
     if(is_synchronized) {
         DESYNCHRONIZE(synchronized_recv);
     }
+    return (ret + 1);
 }
 
 void