]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Turn on extra debugging 210/head
authorMike Brady <mikebrady@eircom.net>
Sun, 24 Jan 2016 13:36:16 +0000 (13:36 +0000)
committerMike Brady <mikebrady@eircom.net>
Sun, 24 Jan 2016 13:36:16 +0000 (13:36 +0000)
rtp.c
rtsp.c

diff --git a/rtp.c b/rtp.c
index 6a1e35ffa46aafdf6fc87d7b0a93020eaf20b167..bc40948d48d249d4fabd77cc50301745a2142d26 100644 (file)
--- a/rtp.c
+++ b/rtp.c
@@ -701,10 +701,10 @@ void rtp_shutdown(void) {
 
 void rtp_request_resend(seq_t first, uint32_t count) {
   if (running) {
-    if (!request_sent) {
+    //if (!request_sent) {
       debug(2, "requesting resend of %d packets starting at %u.", count, first);
-      request_sent = 1;
-    }
+    //  request_sent = 1;
+    //}
 
     char req[8]; // *not* a standard RTCP NACK
     req[0] = 0x80;
@@ -723,10 +723,10 @@ void rtp_request_resend(seq_t first, uint32_t count) {
       perror("Error sendto-ing to audio socket");
     }
   } else {
-    if (!request_sent) {
+    //if (!request_sent) {
       debug(2, "rtp_request_resend called without active stream!");
-      request_sent = 1;
-    }
+    //  request_sent = 1;
+    //}
   }
 }
 
diff --git a/rtsp.c b/rtsp.c
index fe53e658d394f3ddb831ecdc5feef1507bc20988..6e8f1df795df07a938213576cf6671d67a36bfb2 100644 (file)
--- a/rtsp.c
+++ b/rtsp.c
@@ -243,6 +243,7 @@ static inline int rtsp_playing(void) {
 }
 
 void rtsp_request_shutdown_stream(void) {
+  debug(1,"Request to shut down all rtsp conversation threads");
   ask_other_rtsp_conversation_threads_to_stop(0); // i.e. ask all playing threads to stop
 }
 
@@ -251,7 +252,7 @@ static void rtsp_take_player(void) {
     return;
 
   if (pthread_mutex_trylock(&playing_mutex)) {
-    debug(1, "asking all other playing threads to stop.");   
+    debug(1, "Request to all other playing threads to stop.");   
     ask_other_rtsp_conversation_threads_to_stop(pthread_self()); // all threads apart from self
     pthread_mutex_lock(&playing_mutex);
   }
@@ -639,7 +640,7 @@ static void handle_options(rtsp_conn_info *conn, rtsp_message *req, rtsp_message
 
 static void handle_teardown(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp) {
   if (!rtsp_playing())
-    return;
+    debug(1,"This RTSP conversation thread doesn't think it's playing, but it's sending a response to teardown anyway");
   resp->respcode = 200;
   msg_add_header(resp, "Connection", "close");
   conn->stop = 1;
@@ -647,7 +648,7 @@ static void handle_teardown(rtsp_conn_info *conn, rtsp_message *req, rtsp_messag
 
 static void handle_flush(rtsp_conn_info *conn, rtsp_message *req, rtsp_message *resp) {
   if (!rtsp_playing())
-    return;
+        debug(1,"This RTSP conversation thread doesn't think it's playing, but it's sending a response to flush anyway");
   char *p;
   uint32_t rtptime = 0;
   char *hdr = msg_get_header(req, "RTP-Info");
@@ -1581,6 +1582,8 @@ static void *rtsp_conversation_thread_func(void *pconn) {
     rtp_shutdown();
     pthread_mutex_unlock(&play_lock);
     pthread_mutex_unlock(&playing_mutex);
+  } else {
+      debug(1,"This RTSP conversation thread doesn't think it's playing for a close RTSP connection.");
   }
   if (auth_nonce)
     free(auth_nonce);
@@ -1654,6 +1657,7 @@ void rtsp_listen_loop(void) {
 
     // one of the address families will fail on some systems that
     // report its availability. do not complain.
+   
     if (ret) {
       debug(1, "Failed to bind to address %s.", format_address(p->ai_addr));
       continue;