]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Get more diagnostic messages when a TuneBlade-induced error occurs.
authorMike Brady <mikebrady@eircom.net>
Tue, 13 Nov 2018 11:00:05 +0000 (11:00 +0000)
committerMike Brady <mikebrady@eircom.net>
Tue, 13 Nov 2018 11:00:05 +0000 (11:00 +0000)
player.c
rtsp.c

index 43461bf3bf7637e70a48e65d25eb3b9cb10ae1be..803288e65f794d21b3356e5dc92618d2ba92a7ed 100644 (file)
--- a/player.c
+++ b/player.c
@@ -2777,6 +2777,7 @@ int player_stop(rtsp_conn_info *conn) {
   if (conn->player_thread) {
     debug(2, "player_thread cancel...");
     pthread_cancel(*conn->player_thread);
+    debug(2, "player_thread join...");
     pthread_join(*conn->player_thread, NULL);
     debug(2, "player_thread joined.");
     free(conn->player_thread);
diff --git a/rtsp.c b/rtsp.c
index 4446d80643729e06c90efa01e1f50f0e6f87f88b..adb2dc50b9f1c4f67cb5141ae472e8c546d95adf 100644 (file)
--- a/rtsp.c
+++ b/rtsp.c
@@ -2079,9 +2079,11 @@ static void *rtsp_conversation_thread_func(void *pconn) {
       if (conn->stop == 0) {
         int err = msg_write_response(conn->fd, resp);
         if (err) {
+               int odv = debuglev;
+               debuglev = 3;
                debug(1,"A communication error was detected. Closing the play session.");
-               conn->stop = 1;
-               pthread_cancel(conn->thread);
+               player_stop(conn);
+               debuglev = odv;
         }
       }
       pthread_cleanup_pop(1);