From: Juho Vähä-Herttua Date: Tue, 20 Mar 2012 22:57:19 +0000 (+0200) Subject: Improve logging on thread cleanups. X-Git-Tag: upstream/0.9.0~4^2~89 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=e1a8dfe69a0419217bcce0354fa920dc34a0569d;p=deb_shairplay.git Improve logging on thread cleanups. --- diff --git a/src/lib/httpd.c b/src/lib/httpd.c index 6ad2869..8a38443 100644 --- a/src/lib/httpd.c +++ b/src/lib/httpd.c @@ -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; } diff --git a/src/lib/raop_rtp.c b/src/lib/raop_rtp.c index 205eee9..7ab98dc 100644 --- a/src/lib/raop_rtp.c +++ b/src/lib/raop_rtp.c @@ -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;