]> Git repositories of Nishi - tewi.git/commitdiff
add error reporting
authorNishi <nishi@nishi.boats>
Thu, 19 Sep 2024 12:50:05 +0000 (12:50 +0000)
committerNishi <nishi@nishi.boats>
Thu, 19 Sep 2024 12:50:05 +0000 (12:50 +0000)
git-svn-id: file:///raid/svn-personal/tewi/trunk@84 8739d7e6-ffea-ec47-b151-bdff447c6205

Server/server.c

index d0b4963edf9bc3178136597f5a97d42aaf0ddaf0..b47ca3832905a09abefaed06a2e156ede916abcb 100644 (file)
@@ -21,6 +21,7 @@
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <errno.h>
 #include <sys/stat.h>
 #include <time.h>
 
@@ -765,6 +766,9 @@ void tw_server_loop(void) {
                tv.tv_usec = 0;
                int ret = select(FD_SETSIZE, &fdset, NULL, NULL, &tv);
                if(ret == -1) {
+#ifndef __MINGW32__
+                       cm_log("Server", "Select failure: %s", strerror(errno));
+#endif
                        break;
                } else if(ret == 0) {
 #ifdef __MINGW32__