Improve logging on thread cleanups.
authorJuho Vähä-Herttua <juhovh@iki.fi>
Tue, 20 Mar 2012 22:57:19 +0000 (00:57 +0200)
committerJuho Vähä-Herttua <juhovh@iki.fi>
Wed, 16 May 2012 21:33:32 +0000 (00:33 +0300)
src/lib/httpd.c
src/lib/raop_rtp.c

index 6ad28696b397c3edc3247a1899035f5ace652510..8a3844329d86fde041d4d83b14182e7ff7a2076b 100644 (file)
@@ -235,10 +235,10 @@ httpd_thread(void *arg)
                                assert(connection->request);
                        }
 
-                       logger_log(httpd->logger, LOGGER_DEBUG, "Receiving on socket %d\n", httpd->connections[i].socket_fd);
+                       logger_log(httpd->logger, LOGGER_DEBUG, "Receiving on socket %d\n", connection->socket_fd);
                        ret = recv(connection->socket_fd, buffer, sizeof(buffer), 0);
                        if (ret == 0) {
-                               logger_log(httpd->logger, LOGGER_INFO, "Connection closed\n");
+                               logger_log(httpd->logger, LOGGER_INFO, "Connection closed for socket %d\n", connection->socket_fd);
                                httpd_remove_connection(httpd, connection);
                                continue;
                        }
@@ -293,11 +293,11 @@ httpd_thread(void *arg)
                if (!connection->connected) {
                        continue;
                }
-               logger_log(httpd->logger, LOGGER_INFO, "Removing connection\n");
+               logger_log(httpd->logger, LOGGER_INFO, "Removing connection for socket %d\n", connection->socket_fd);
                httpd_remove_connection(httpd, connection);
        }
 
-       logger_log(httpd->logger, LOGGER_INFO, "Exiting thread\n");
+       logger_log(httpd->logger, LOGGER_INFO, "Exiting HTTP thread\n");
 
        return 0;
 }
index 205eee98c097b8b550be662f7bb8aeb2768072c5..7ab98dc32ca48937ec696858b0a50cb26c7bde64 100644 (file)
@@ -355,7 +355,7 @@ raop_rtp_thread_udp(void *arg)
                        }
                }
        }
-       logger_log(raop_rtp->logger, LOGGER_INFO, "Exiting thread\n");
+       logger_log(raop_rtp->logger, LOGGER_INFO, "Exiting UDP RAOP thread\n");
        raop_rtp->callbacks.audio_destroy(raop_rtp->callbacks.cls, cb_data);
 
        return 0;
@@ -493,7 +493,7 @@ raop_rtp_thread_tcp(void *arg)
                closesocket(stream_fd);
        }
 
-       logger_log(raop_rtp->logger, LOGGER_INFO, "Exiting thread\n");
+       logger_log(raop_rtp->logger, LOGGER_INFO, "Exiting TCP RAOP thread\n");
        raop_rtp->callbacks.audio_destroy(raop_rtp->callbacks.cls, cb_data);
 
        return 0;