]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Add an error message if an RTSP thread can not be created.
authorMike Brady <mikebrady@eircom.net>
Sun, 13 Jan 2019 13:14:39 +0000 (13:14 +0000)
committerMike Brady <mikebrady@eircom.net>
Sun, 13 Jan 2019 13:14:39 +0000 (13:14 +0000)
rtsp.c

diff --git a/rtsp.c b/rtsp.c
index d44ae0f0441e90e45294f8326824f69ffd9137b9..6e98944f616b6ceaddb21b028cbd28471074aad5 100644 (file)
--- a/rtsp.c
+++ b/rtsp.c
@@ -2590,8 +2590,12 @@ void rtsp_listen_loop(void) {
 
       ret = pthread_create(&conn->thread, NULL, rtsp_conversation_thread_func,
                            conn); // also acts as a memory barrier
-      if (ret)
-        die("Failed to create RTSP receiver thread %d!", conn->connection_number);
+      if (ret) {
+        char errorstring[1024];
+        strerror_r(ret, (char *)errorstring, sizeof(errorstring));
+        die("Connection %d: cannot create an RTSP conversation thread. Error %d: \"%s\".",
+              conn->connection_number, ret, (char *)errorstring);
+      }
       debug(3, "Successfully created RTSP receiver thread %d.", conn->connection_number);
       conn->running = 1; // this must happen before the thread is tracked
       track_thread(conn);