Quieten lots of debug messages.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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!");
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
+2
-2
@@ -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() {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user