From: Mike Brady Date: Sun, 27 Aug 2017 16:01:18 +0000 (+0100) Subject: Quieten some debug messages. X-Git-Tag: 3.2d3~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=965d9f63b1eeccd9c0427f49a4e1be54e4c4a0fd;p=thirdparty%2Fshairport-sync.git Quieten some debug messages. --- diff --git a/player.c b/player.c index 9605d7b7..49918ac6 100644 --- a/player.c +++ b/player.c @@ -1084,7 +1084,7 @@ static abuf_t *buffer_get_frame(rtsp_conn_info *conn) { if (do_wait == 0) if ((conn->ab_synced != 0) && (conn->ab_read == conn->ab_write)) { // the buffer is empty! if (notified_buffer_empty == 0) { - debug(1, "Buffers exhausted."); + debug(3, "Buffers exhausted."); notified_buffer_empty = 1; } do_wait = 1; @@ -2160,11 +2160,11 @@ static void *player_thread_func(void *arg) { pthread_kill(rtp_control_thread, SIGUSR1); pthread_kill(rtp_timing_thread, SIGUSR1); pthread_join(rtp_timing_thread, NULL); - debug(1, "timing thread joined"); + debug(3, "timing thread joined"); pthread_join(rtp_audio_thread, NULL); - debug(1, "audio thread joined"); + debug(3, "audio thread joined"); pthread_join(rtp_control_thread, NULL); - debug(1, "control thread joined"); + debug(3, "control thread joined"); clear_reference_timestamp(conn); conn->rtp_running = 0; @@ -2473,6 +2473,6 @@ void player_stop(rtsp_conn_info *conn) { free(conn->player_thread); conn->player_thread = NULL; } else { - debug(1,"player thread of RTSP conversation %d is already deleted.",conn->connection_number); + debug(3,"player thread of RTSP conversation %d is already deleted.",conn->connection_number); } } diff --git a/rtp.c b/rtp.c index 092fb123..405dbd6e 100644 --- a/rtp.c +++ b/rtp.c @@ -152,7 +152,7 @@ void *rtp_audio_receiver(void *arg) { warn("Audio receiver -- Unknown RTP packet of type 0x%02X length %d.", type, nread); } - debug(1, "Audio receiver -- Server RTP thread interrupted. terminating."); + debug(3, "Audio receiver -- Server RTP thread interrupted. terminating."); close(conn->audio_socket); return NULL; @@ -251,13 +251,13 @@ void *rtp_control_receiver(void *arg) { player_put_packet(seqno, timestamp, pktp, plen, conn); continue; } else { - debug(1, "Too-short retransmitted audio packet received in control port, ignored."); + debug(3, "Too-short retransmitted audio packet received in control port, ignored."); } } else - debug(1, "Control Port -- Unknown RTP packet of type 0x%02X length %d.", packet[1], nread); + debug(1, "Control Port -- Unknown RTP packet of type 0x%02X length %d, ignored.", packet[1], nread); } - debug(1, "Control RTP thread interrupted. terminating."); + debug(3, "Control RTP thread interrupted. terminating."); close(conn->control_socket); return NULL; @@ -315,7 +315,7 @@ void *rtp_timing_sender(void *arg) { else sleep(3); } - debug(1, "rtp_timing_sender thread interrupted. terminating."); + debug(3, "rtp_timing_sender thread interrupted. terminating."); return NULL; } @@ -519,14 +519,14 @@ void *rtp_timing_receiver(void *arg) { } } - debug(1, "Timing thread interrupted. terminating."); + debug(3, "Timing thread interrupted. terminating."); conn->timing_sender_stop = 1; void *retval; pthread_kill(timer_requester, SIGUSR1); - debug(1, "Wait for timer requester to exit."); + debug(3, "Wait for timer requester to exit."); pthread_join(timer_requester, &retval); - debug(1, "Closed and terminated timer requester thread."); - debug(1, "Timing RTP thread terminated."); + debug(3, "Closed and terminated timer requester thread."); + debug(3, "Timing RTP thread terminated."); close(conn->timing_socket); return NULL; diff --git a/rtsp.c b/rtsp.c index 4ea0b280..12e9d8d1 100644 --- a/rtsp.c +++ b/rtsp.c @@ -262,9 +262,9 @@ static void cleanup_threads(void) { // debug(2, "culling threads."); for (i = 0; i < nconns;) { if (conns[i]->running == 0) { - debug(1, "found RTSP connection thread %d in a non-running state.",conns[i]->connection_number); + debug(3, "found RTSP connection thread %d in a non-running state.",conns[i]->connection_number); pthread_join(conns[i]->thread, &retval); - debug(1, "RTSP connection thread %d deleted...",conns[i]->connection_number); + debug(3, "RTSP connection thread %d deleted...",conns[i]->connection_number); free(conns[i]); nconns--; if (nconns) @@ -459,7 +459,7 @@ static enum rtsp_read_request_response rtsp_read_request(rtsp_conn_info *conn, while (msg_size < 0) { memory_barrier(); if (conn->stop != 0) { - debug(1, "RTSP conversation thread %d shutdown requested.",conn->connection_number); + debug(3, "RTSP conversation thread %d shutdown requested.",conn->connection_number); reply = rtsp_read_request_response_immediate_shutdown_requested; goto shutdown; } @@ -467,7 +467,7 @@ static enum rtsp_read_request_response rtsp_read_request(rtsp_conn_info *conn, if (nread == 0) { // a blocking read that returns zero means eof -- implies connection closed - debug(1, "RTSP conversation thread %d -- connection closed.",conn->connection_number); + debug(3, "RTSP conversation thread %d -- connection closed.",conn->connection_number); reply = rtsp_read_request_response_channel_closed; goto shutdown; } @@ -644,10 +644,10 @@ static void handle_teardown(rtsp_conn_info *conn, rtsp_message *req, rtsp_messag resp->respcode = 200; msg_add_header(resp, "Connection", "close"); - debug(1, "TEARDOWN: synchronously terminating the player thread of RTSP conversation thread %d (2).",conn->connection_number); + debug(3, "TEARDOWN: synchronously terminating the player thread of RTSP conversation thread %d (2).",conn->connection_number); //if (rtsp_playing()) { player_stop(conn); - debug(1, "TEARDOWN: successful termination of playing thread of RTSP conversation thread %d.",conn->connection_number); + debug(3, "TEARDOWN: successful termination of playing thread of RTSP conversation thread %d.",conn->connection_number); //} } @@ -1375,7 +1375,7 @@ static void handle_set_parameter(rtsp_conn_info *conn, rtsp_message *req, rtsp_m } static void handle_announce(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp) { - debug(1,"Connection %d: ANNOUNCE",conn->connection_number); + debug(3,"Connection %d: ANNOUNCE",conn->connection_number); int have_the_player = 0; // interrupt session if permitted @@ -1383,7 +1383,7 @@ static void handle_announce(rtsp_conn_info *conn, rtsp_message *req, rtsp_messag have_the_player = 1; } else { if (playing_conn) { - debug(1,"RTSP Conversation thread %d already playing.",playing_conn->connection_number); + debug(1,"RTSP Conversation thread %d already playing when asked by thread %d.",playing_conn->connection_number,conn->connection_number); } else { debug(1,"play_lock locked but no playing_conn."); } @@ -1413,7 +1413,7 @@ static void handle_announce(rtsp_conn_info *conn, rtsp_message *req, rtsp_messag if (have_the_player) { playing_conn = conn; // the present connection is now playing - debug(1,"RTSP conversation thread %d has acquired play lock.",conn->connection_number); + debug(3,"RTSP conversation thread %d has acquired play lock.",conn->connection_number); resp->respcode = 456; // 456 - Header Field Not Valid for Resource char *paesiv = NULL; char *prsaaeskey = NULL; @@ -1492,14 +1492,14 @@ static void handle_announce(rtsp_conn_info *conn, rtsp_message *req, rtsp_messag char *hdr = msg_get_header(req, "X-Apple-Client-Name"); if (hdr) { - debug(1, "Play connection from device named \"%s\".", hdr); + debug(1, "Play connection from device named \"%s\" on RTSP conversation thread %d.", hdr,conn->connection_number); #ifdef CONFIG_METADATA send_metadata('ssnc', 'snam', hdr, strlen(hdr), req, 1); #endif } hdr = msg_get_header(req, "User-Agent"); if (hdr) { - debug(1, "Play connection from user agent \"%s\".", hdr); + debug(1, "Play connection from user agent \"%s\" on RTSP conversation thread %d.", hdr,conn->connection_number); #ifdef CONFIG_METADATA send_metadata('ssnc', 'snua', hdr, strlen(hdr), req, 1); #endif @@ -1800,10 +1800,10 @@ static void *rtsp_conversation_thread_func(void *pconn) { } else { if ((reply==rtsp_read_request_response_immediate_shutdown_requested) || (reply==rtsp_read_request_response_channel_closed)) { - debug(1, "Synchronously terminate playing thread of RTSP conversation thread %d.",conn->connection_number); + debug(3, "Synchronously terminate playing thread of RTSP conversation thread %d.",conn->connection_number); player_stop(conn); - debug(1, "Successful termination of playing thread of RTSP conversation thread %d.",conn->connection_number); - debug(1, "Request termination of RTSP conversation thread %d.",conn->connection_number); + debug(3, "Successful termination of playing thread of RTSP conversation thread %d.",conn->connection_number); + debug(3, "Request termination of RTSP conversation thread %d.",conn->connection_number); conn->stop = 1; } else { debug(1, "rtsp_read_request error %d, packet ignored.", (int)reply); @@ -1817,11 +1817,11 @@ static void *rtsp_conversation_thread_func(void *pconn) { free(auth_nonce); rtp_terminate(conn); if (playing_conn==conn) { - debug(1,"Unlocking play lock on RTSP conversation thread %d.",conn->connection_number); + debug(3,"Unlocking play lock on RTSP conversation thread %d.",conn->connection_number); playing_conn = NULL; pthread_mutex_unlock(&play_lock); } - debug(1, "RTSP conversation thread %d terminated.",conn->connection_number); + debug(3, "RTSP conversation thread %d terminated.",conn->connection_number); // please_shutdown = 0; conn->running = 0; return NULL; @@ -1998,8 +1998,8 @@ void rtsp_listen_loop(void) { send_ssnc_metadata('clip', strdup(remote_ip4), strlen(remote_ip4), 1); send_ssnc_metadata('svip', strdup(ip4), strlen(ip4), 1); #endif - debug(1, "New RTSP connection from %s:%u to self at %s:%u.", remote_ip4, rport, ip4, - tport); + debug(1, "New RTSP connection from %s:%u to self at %s:%u on conversation thread %d.", remote_ip4, rport, ip4, + tport,conn->connection_number); } #ifdef AF_INET6 if (local_info->SAFAMILY == AF_INET6) { @@ -2019,8 +2019,8 @@ void rtsp_listen_loop(void) { send_ssnc_metadata('clip', strdup(remote_ip6), strlen(remote_ip6), 1); send_ssnc_metadata('svip', strdup(ip6), strlen(ip6), 1); #endif - debug(1, "New RTSP connection from [%s]:%u to self at [%s]:%u.", remote_ip6, rport, ip6, - tport); + debug(1, "New RTSP connection from [%s]:%u to self at [%s]:%u on conversation thread %d.", remote_ip6, rport, ip6, + tport,conn->connection_number); } #endif @@ -2036,7 +2036,7 @@ void rtsp_listen_loop(void) { conn); // also acts as a memory barrier if (ret) die("Failed to create RTSP receiver thread %d!",conn->connection_number); - debug(1,"Successfully created RTSP receiver thread %d.",conn->connection_number); + debug(3,"Successfully created RTSP receiver thread %d.",conn->connection_number); conn->running = 1; // this must happen before the thread is tracked track_thread(conn); }