]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Clean up creation of conversation thread -- no functional difference.
authorMike Brady <mikebrady@eircom.net>
Tue, 14 Mar 2017 10:38:48 +0000 (10:38 +0000)
committerMike Brady <mikebrady@eircom.net>
Tue, 14 Mar 2017 10:38:48 +0000 (10:38 +0000)
rtsp.c

diff --git a/rtsp.c b/rtsp.c
index ce4dab753ca983809ba330316797e9f3ea4a575e..a02cc8d5e02ba93d6d1f9cf4a9bac7cba99d53eb 100644 (file)
--- a/rtsp.c
+++ b/rtsp.c
@@ -1974,18 +1974,15 @@ void rtsp_listen_loop(void) {
       } else {
         debug(1, "Error figuring out Shairport Sync's own IP number.");
       }
-
-      usleep(500000);
-      pthread_t rtsp_conversation_thread;
-      conn->stop = 0;
-      conn->authorized = 0;
+        usleep(500000);
+//      pthread_t rtsp_conversation_thread;
+//      conn->thread = rtsp_conversation_thread;
+//      conn->stop = 0; // record's memory has been zeroed 
+//      conn->authorized = 0; // record's memory has been zeroed 
       conn->running = 1;
-      ret = pthread_create(&rtsp_conversation_thread, NULL, rtsp_conversation_thread_func, conn);
+      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!");
-
-      conn->thread = rtsp_conversation_thread;
-      memory_barrier();
       track_thread(conn);
     }
   }