From: Mike Brady Date: Wed, 23 Aug 2017 11:45:57 +0000 (+0100) Subject: Add more thread numbers X-Git-Tag: 3.2d1~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee8629be2b3fde9957f0d4c2de9b45a42b25b469;p=thirdparty%2Fshairport-sync.git Add more thread numbers --- diff --git a/rtp.c b/rtp.c index cb1945e6..7b4cc071 100644 --- a/rtp.c +++ b/rtp.c @@ -713,9 +713,9 @@ void get_reference_timestamp_stuff(int64_t *timestamp, uint64_t *timestamp_time, pthread_mutex_lock(&conn->reference_time_mutex); *timestamp = conn->reference_timestamp; *timestamp_time = conn->reference_timestamp_time; - if ((*timestamp == 0) && (*timestamp_time == 0)) { - debug(1,"Reference timestamp is invalid."); - } + //if ((*timestamp == 0) && (*timestamp_time == 0)) { + // debug(1,"Reference timestamp is invalid."); + //} *remote_timestamp_time = conn->remote_reference_timestamp_time; pthread_mutex_unlock(&conn->reference_time_mutex); } diff --git a/rtsp.c b/rtsp.c index 6e6f907e..9dd51261 100644 --- a/rtsp.c +++ b/rtsp.c @@ -289,10 +289,10 @@ static void cleanup_threads(void) { // debug(2, "culling threads."); for (i = 0; i < nconns;) { if (conns[i]->running == 0) { - debug(1, "found a non-running thread"); + debug(1, "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); free(conns[i]); - debug(1, "one thread joined..."); nconns--; if (nconns) conns[i] = conns[nconns]; @@ -1401,6 +1401,11 @@ static void handle_announce(rtsp_conn_info *conn, rtsp_message *req, rtsp_messag if (pthread_mutex_trylock(&play_lock) == 0) { have_the_player = 1; } else { + if (playing_conn) { + debug(1,"RTSP Conversation thread %d already playing.",playing_conn->connection_number); + } else { + debug(1,"play_lock locked but no playing_conn."); + } if (config.allow_session_interruption == 1) { // some other thread has the player ... ask it to relinquish the thread if (playing_conn) {