- add debug-area for server-debugging

This commit is contained in:
Stefan Gehn 2008-09-28 19:16:02 +00:00
parent d4f189fb05
commit 1f28fe7a74
2 changed files with 4 additions and 0 deletions

View File

@ -77,6 +77,7 @@
#endif #endif
#define DEBUG_SYSDEP 0x1 #define DEBUG_SYSDEP 0x1
#define DEBUG_SERVER 0x2
#define DEBUG_MAIL 0x10 #define DEBUG_MAIL 0x10
#define DEBUG_NET 0x20 #define DEBUG_NET 0x20
#define DEBUG_TIMER 0x40 #define DEBUG_TIMER 0x40

View File

@ -1196,6 +1196,7 @@ gkrellmd_run(gint argc, gchar **argv)
interval = 1000000 / _GK.update_HZ; interval = 1000000 / _GK.update_HZ;
gkrellm_debug(DEBUG_SERVER, "Entering main event loop\n");
// main event loop // main event loop
#if defined(WIN32) #if defined(WIN32)
/* endless loop if: /* endless loop if:
@ -1249,6 +1250,7 @@ gkrellmd_run(gint argc, gchar **argv)
} }
if (server_fd >= 0) if (server_fd >= 0)
{ {
gkrellm_debug(DEBUG_SERVER, "Calling accept() for new client connection\n");
client_fd = accept(server_fd, client_fd = accept(server_fd,
(struct sockaddr *) &client_addr, (struct sockaddr *) &client_addr,
(socklen_t *) (void *)&addr_len); (socklen_t *) (void *)&addr_len);
@ -1277,6 +1279,7 @@ gkrellmd_run(gint argc, gchar **argv)
} }
else else
{ {
gkrellm_debug(DEBUG_SERVER, "Reading data from client connection\n");
#if defined(WIN32) #if defined(WIN32)
ioctlsocket(fd, FIONREAD, &nbytes); ioctlsocket(fd, FIONREAD, &nbytes);
#else #else