Ticket #43: dss-bind-on-all-ip.patch
| File dss-bind-on-all-ip.patch, 1.7 KB (added by bsa@…, 3 years ago) |
|---|
-
DarwinStreamingSrvr6.0.
old new 565 565 { 566 566 //function finds all IP addresses on this machine, and binds 1 RTP / RTCP 567 567 //socket pair to a port pair on each address. 568 568 //but only to IP adresses defined in <PREF NAME="bind_ip_addr" ></PREF> 569 569 570 UInt32 theNumAllocatedPairs = 0; 571 572 // default in streamingserver.xml is <PREF NAME="bind_ip_addr" >0</PREF> 573 StrPtrLen tmpNullValue("0",1); 574 570 575 for (UInt32 theNumPairs = 0; theNumPairs < SocketUtils::GetNumIPAddrs(); theNumPairs++) 571 576 { 572 UDPSocketPair* thePair = fSocketPool->CreateUDPSocketPair(SocketUtils::GetIPAddr(theNumPairs), 0); 573 if (thePair != NULL) 574 { 575 theNumAllocatedPairs++; 576 thePair->GetSocketA()->RequestEvent(EV_RE); 577 thePair->GetSocketB()->RequestEvent(EV_RE); 578 } 577 if (QTSSModuleUtils::FindStringInAttributeList(fSrvrPrefs, qtssPrefsRTSPIPAddr, SocketUtils::GetIPAddrStr( theNumPairs)) || QTSSModuleUtils::FindStringInAttributeList(fSrvrPrefs, qtssPrefsRTSPIPAddr, &tmpNullValue)) 578 { 579 UDPSocketPair* thePair = fSocketPool->CreateUDPSocketPair(SocketUtils::GetIPAddr(theNumPairs), 0); 580 if (thePair != NULL) 581 { 582 theNumAllocatedPairs++; 583 thePair->GetSocketA()->RequestEvent(EV_RE); 584 thePair->GetSocketB()->RequestEvent(EV_RE); 585 } 579 586 } 587 } 580 588 //only return an error if we couldn't allocate ANY pairs of sockets 581 589 if (theNumAllocatedPairs == 0) 582 590 {

