]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Quieten lots of debug messages.
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Fri, 5 Dec 2025 08:49:22 +0000 (08:49 +0000)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Fri, 5 Dec 2025 08:49:22 +0000 (08:49 +0000)
ap2_buffered_audio_processor.c
ap2_event_receiver.c
player.c
rtsp.c
shairport.c
utilities/buffered_read.c

index 70e478e588127ad62e205702ec01396810060d21..806bc2cce25cd85f1be001b556a783f88a486335 100644 (file)
@@ -102,7 +102,7 @@ void *rtp_buffered_audio_processor(void *arg) {
   rtsp_conn_info *conn = (rtsp_conn_info *)arg;
   // #include <syscall.h>
   // debug(1, "Connection %d: rtp_buffered_audio_processor PID %d start", conn->connection_number,
-        syscall(SYS_gettid));
+  //         syscall(SYS_gettid));
   conn->incoming_ssrc = 0; // reset
   conn->resampler_ssrc = 0;
 
index 29d7d644cee8a5d4bfbb07760790315f0cf20e1c..c1053e33e908e3d118f074db795c808d500a7a1e 100644 (file)
@@ -34,7 +34,7 @@
 
 void ap2_event_receiver_cleanup_handler(void *arg) {
   rtsp_conn_info *conn = (rtsp_conn_info *)arg;
-  debug(1, "Connection %d: AP2 Event Receiver Cleanup start.", conn->connection_number);
+  debug(3, "Connection %d: AP2 Event Receiver Cleanup start.", conn->connection_number);
   // only update these things if you're (still) the principal conn
 
 #ifdef CONFIG_METADATA
@@ -60,13 +60,13 @@ void ap2_event_receiver_cleanup_handler(void *arg) {
   if (principal_conn == conn) {
     config.airplay_statusflags &= (0xffffffff - (1 << 11)); // DeviceSupportsRelay
     build_bonjour_strings(conn);
-    debug(1, "Connection %d: SETUP mdns_update on %s.", conn->connection_number,
+    debug(3, "Connection %d: SETUP mdns_update on %s.", conn->connection_number,
           get_category_string(conn->airplay_stream_category));
     mdns_update(NULL, secondary_txt_records);
     principal_conn = NULL;
   }
   pthread_cleanup_pop(1); // release the principal_conn lock
-  debug(1, "Connection %d: AP2 Event Receiver Cleanup exit.", conn->connection_number);
+  debug(2, "Connection %d: AP2 Event Receiver Cleanup exit.", conn->connection_number);
 }
 
 void *ap2_event_receiver(void *arg) {
@@ -178,19 +178,19 @@ void *ap2_event_receiver(void *arg) {
           debug(3, "Connection %d: Packet Received on Event Port with contents: \"%s\".",
                 conn->connection_number, packet);
         } else {
-          debug(1, "Connection %d: Event Port connection closed by client",
+          debug(2, "Connection %d: Event Port connection closed by client",
                 conn->connection_number);
           finished = 1;
         }
       }
 
     } while (finished == 0);
-    debug(1, "Connection %d: AP2 Event Receiver RTP thread starting \"normal\" exit.",
+    debug(3, "Connection %d: AP2 Event Receiver RTP thread starting \"normal\" exit.",
           conn->connection_number);
     pthread_cleanup_pop(1); // close the socket
     pthread_cleanup_pop(1); // do the cleanup
     pthread_cleanup_pop(1); // delete the structured buffer
-    debug(1, "Connection %d: AP2 Event Receiver RTP thread \"normal\" exit.",
+    debug(2, "Connection %d: AP2 Event Receiver RTP thread \"normal\" exit.",
           conn->connection_number);
   } else {
     debug(1, "Could not allocate a structured buffer!");
index fbcb80e1e0d6cc4fb4cd3a06713213b1e6f1d0c6..add9e6dbc26e1330c5b473c534c161dcb4864c67 100644 (file)
--- a/player.c
+++ b/player.c
@@ -3315,12 +3315,12 @@ void player_thread_cleanup_handler(void *arg) {
 
     } else if (conn->airplay_stream_type == buffered_stream) {
 
-      debug(1,
+      debug(3,
             "Connection %d: Delete Buffered Audio Stream thread by player_thread_cleanup_handler",
             conn->connection_number);
       pthread_cancel(conn->rtp_buffered_audio_thread);
       pthread_join(conn->rtp_buffered_audio_thread, NULL);
-      debug(1,
+      debug(3,
             "Connection %d: Deleted Buffered Audio Stream thread by player_thread_cleanup_handler",
             conn->connection_number);
     } else {
diff --git a/rtsp.c b/rtsp.c
index 224af845658ca8b3439ae62ca33517c360dffd53..638672750449b3e3712aeddb40ef65bd911cab1a 100644 (file)
--- a/rtsp.c
+++ b/rtsp.c
@@ -1001,8 +1001,6 @@ void set_client_as_ptp_clock(rtsp_conn_info *conn) {
           sizeof(timing_list_message) - 1 - strlen(timing_list_message));
   ptp_send_control_message_string(timing_list_message);
 }
-
-void clear_ptp_clock() { ptp_send_control_message_string("T"); }
 #endif
 
 enum rtsp_read_request_response rtsp_read_request(rtsp_conn_info *conn, rtsp_message **the_packet) {
@@ -1052,7 +1050,7 @@ enum rtsp_read_request_response rtsp_read_request(rtsp_conn_info *conn, rtsp_mes
             } else {
               char errorstring[1024];
               strerror_r(errno, (char *)errorstring, sizeof(errorstring));
-              debug(1, "Connection %d RTSP port closed by client with error %d: \"%s\".",
+              debug(2, "Connection %d RTSP port closed by client with error %d: \"%s\".",
                     conn->connection_number, errno, (char *)errorstring);
             }
             close(conn->fd); // close it from our end too...
@@ -2788,7 +2786,7 @@ void handle_setup_2(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp)
       plist_get_string_val(timingProtocol, &timingProtocolString);
       if (timingProtocolString) {
         if (strcmp(timingProtocolString, "PTP") == 0) {
-          debug(1, "Connection %d: AP2 PTP connection from %s:%u (\"%s\") to self at %s:%u.",
+          debug(2, "Connection %d: AP2 PTP connection from %s:%u (\"%s\") to self at %s:%u.",
                 conn->connection_number, conn->client_ip_string, conn->client_rtsp_port,
                 clientNameString, conn->self_ip_string, conn->self_rtsp_port);
           conn->airplay_stream_category = ptp_stream;
@@ -2854,7 +2852,6 @@ void handle_setup_2(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp)
             if (ptp_shm_interface_open() !=
                 0) // it should be open already, but just in case it isn't...
               die("Can not access the NQPTP service. Has it stopped running?");
-            // clear_ptp_clock();
             debug_log_rtsp_message(3, "SETUP \"PTP\" message", req);
             plist_t groupUUID = plist_dict_get_item(messagePlist, "groupUUID");
             if (groupUUID) {
@@ -3271,7 +3268,7 @@ void handle_setup_2(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp)
 
         activity_monitor_signify_activity(1);
 
-        debug(1, "Connection %d: create rtp_buffered_audio_thread", conn->connection_number);
+        // debug(1, "Connection %d: create rtp_buffered_audio_thread", conn->connection_number);
 
         named_pthread_create_with_priority(&conn->rtp_buffered_audio_thread, 2,
                                            &rtp_buffered_audio_processor, (void *)conn,
@@ -4979,7 +4976,7 @@ void rtsp_conversation_thread_cleanup_function(void *arg) {
     int oldState;
     pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &oldState);
 
-    debug(1, "Connection %d: %s rtsp_conversation_thread_func_cleanup_function called.",
+    debug(3, "Connection %d: %s rtsp_conversation_thread_func_cleanup_function called.",
           conn->connection_number, get_category_string(conn->airplay_stream_category));
 
     if (conn->player_thread) {
@@ -4989,7 +4986,7 @@ void rtsp_conversation_thread_cleanup_function(void *arg) {
 
     if (conn->fd > 0) {
       debug(
-          1,
+          2,
           "Connection %d: terminating -- closing RTSP connection socket %d: from %s:%u to self at "
           "%s:%u.",
           conn->connection_number, conn->fd, conn->client_ip_string, conn->client_rtsp_port,
@@ -5017,7 +5014,7 @@ void rtsp_conversation_thread_cleanup_function(void *arg) {
     free(conn->rtp_event_thread);
     conn->rtp_event_thread = NULL;
     conn->ap2_event_receiver_exited = 0;
-    debug(1, "Connection %d: %s event thread deleted.", conn->connection_number,
+    debug(3, "Connection %d: %s event thread deleted.", conn->connection_number,
           get_category_string(conn->airplay_stream_category));
 #endif
 
@@ -5116,7 +5113,7 @@ void rtsp_conversation_thread_cleanup_function(void *arg) {
     if (rc)
       debug(1, "Connection %d: error %d destroying flush_mutex.", conn->connection_number, rc);
 
-    debug(1, "Connection %d: Closed.", conn->connection_number);
+    debug(3, "Connection %d: Closed.", conn->connection_number);
     conn->running = 0; // for the garbage collector
     pthread_setcancelstate(oldState, NULL);
   }
index ae3e79e3fa83be6fef4c50ff3fc948dfb6eceb80..9964ce14edf8484c5a3e441da69c0852c5d3ef7e 100644 (file)
@@ -1837,12 +1837,12 @@ const char *pid_file_proc(void) {
 #endif
 
 void exit_rtsp_listener() {
-  debug(1, "exit_rtsp_listener begins");
+  debug(3, "exit_rtsp_listener begins");
   if (type_of_exit_cleanup != TOE_emergency) {
     pthread_cancel(rtsp_listener_thread);
     pthread_join(rtsp_listener_thread, NULL); // not sure you need this
   }
-  debug(1, "exit_rtsp_listener ends");
+  debug(2, "exit_rtsp_listener ends");
 }
 
 void exit_function() {
index faaf8b62309fd2cc83aa6c09efd71b007876cfaf..b2783d857e12367882c12252554714d0636d6c75 100644 (file)
@@ -92,7 +92,7 @@ ssize_t buffered_read(buffered_tcp_desc *descriptor, void *buf, size_t count,
 #define STANDARD_PACKET_SIZE 4096
 
 void buffered_tcp_reader_cleanup_handler(__attribute__((unused)) void *arg) {
-  debug(1, "Buffered TCP Reader Thread Exit via Cleanup.");
+  debug(2, "Buffered TCP Reader Thread Exit via Cleanup.");
 }
 
 void *buffered_tcp_reader(void *arg) {
@@ -160,7 +160,7 @@ void *buffered_tcp_reader(void *arg) {
     } else if (nread == 0) {
       descriptor->closed = 1;
       debug(
-          1,
+          2,
           "buffered audio port closed by remote end. Terminating the buffered_tcp_reader thread.");
       finished = 1;
     } else if (nread > 0) {
@@ -178,10 +178,10 @@ void *buffered_tcp_reader(void *arg) {
       usleep(10000); // give other threads a chance to run...
   } while (finished == 0);
 
-  debug(1, "Buffered TCP Reader Thread Exit \"Normal\" Exit Begin.");
+  debug(2, "Buffered TCP Reader Thread Exit \"Normal\" Exit Begin.");
   pthread_cleanup_pop(1); // close the socket
   pthread_cleanup_pop(1); // cleanup
-  debug(1, "Buffered TCP Reader Thread Exit \"Normal\" Exit.");
+  debug(2, "Buffered TCP Reader Thread Exit \"Normal\" Exit.");
   pthread_exit(NULL);
 }