]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Bind audio stream, timing and control sockets to available port instead of hard coded... 4/head
authorPieter Pottie <me@pieterpottie.com>
Sun, 17 Aug 2014 16:08:50 +0000 (17:08 +0100)
committerPieter Pottie <me@pieterpottie.com>
Sun, 17 Aug 2014 16:08:50 +0000 (17:08 +0100)
rtp.c

diff --git a/rtp.c b/rtp.c
index cf9446588eed98759afc4a6a33166667f0c2a5e6..95dcfb52d92b32e54bef0921ba1a5d972d5a8c48 100644 (file)
--- a/rtp.c
+++ b/rtp.c
@@ -416,10 +416,10 @@ void rtp_setup(SOCKADDR *remote, int cport, int tport, int *lsport, int *lcport,
     }
     
     // now, we open three sockets -- one for the audio stream, one for the timing and one for the control
-    
-     *lsport = bind_port(remote,&audio_socket,6000);
-     *lcport = bind_port(remote,&control_socket,6001);
-     *ltport = bind_port(remote,&timing_socket,6002);
+    // bind to an available port
+     *lsport = bind_port(remote,&audio_socket,0);
+     *lcport = bind_port(remote,&control_socket,0);
+     *ltport = bind_port(remote,&timing_socket,0);
 
     debug(2, "listening for audio, control and timing on ports %d, %d, %d.", *lsport, *lcport, *ltport);