]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Add more thread numbers
authorMike Brady <mikebrady@eircom.net>
Wed, 23 Aug 2017 11:45:57 +0000 (12:45 +0100)
committerMike Brady <mikebrady@eircom.net>
Wed, 23 Aug 2017 11:45:57 +0000 (12:45 +0100)
rtp.c
rtsp.c

diff --git a/rtp.c b/rtp.c
index cb1945e6dcd8b1b93b5e344d6cc2c3c4f9037e89..7b4cc07125bc68b5cf396c207886eddd654b9c53 100644 (file)
--- 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 6e6f907e2ac47dd3c28e25b95ab3735ee65accd1..9dd512617ec9171db67e69aa39afb42554c64e60 100644 (file)
--- 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) {