--- DarwinStreamingSrvr6.0.3-Source-Patched/Server.tproj/QTSServer.cpp.org	2009-05-16 15:06:22.000000000 +0200
+++ DarwinStreamingSrvr6.0.3-Source/Server.tproj/QTSServer.cpp	2009-05-16 15:16:09.000000000 +0200
@@ -565,18 +565,26 @@
 {
     //function finds all IP addresses on this machine, and binds 1 RTP / RTCP
     //socket pair to a port pair on each address.
-    
+    //but only to IP adresses defined in <PREF NAME="bind_ip_addr" ></PREF>
+
     UInt32 theNumAllocatedPairs = 0;
+
+    // default in streamingserver.xml is <PREF NAME="bind_ip_addr" >0</PREF>
+    StrPtrLen tmpNullValue("0",1);
+
     for (UInt32 theNumPairs = 0; theNumPairs < SocketUtils::GetNumIPAddrs(); theNumPairs++)
     {
-        UDPSocketPair* thePair = fSocketPool->CreateUDPSocketPair(SocketUtils::GetIPAddr(theNumPairs), 0);
-                if (thePair != NULL)
-                {
-            theNumAllocatedPairs++;
-                        thePair->GetSocketA()->RequestEvent(EV_RE);
-                        thePair->GetSocketB()->RequestEvent(EV_RE);
-                }
+        if (QTSSModuleUtils::FindStringInAttributeList(fSrvrPrefs, qtssPrefsRTSPIPAddr, SocketUtils::GetIPAddrStr( theNumPairs)) || QTSSModuleUtils::FindStringInAttributeList(fSrvrPrefs, qtssPrefsRTSPIPAddr, &tmpNullValue))
+        {
+            UDPSocketPair* thePair = fSocketPool->CreateUDPSocketPair(SocketUtils::GetIPAddr(theNumPairs), 0);
+            if (thePair != NULL)
+            {
+                theNumAllocatedPairs++;
+                thePair->GetSocketA()->RequestEvent(EV_RE);
+                thePair->GetSocketB()->RequestEvent(EV_RE);
+            }
         }
+    }
     //only return an error if we couldn't allocate ANY pairs of sockets
     if (theNumAllocatedPairs == 0)
         {

