now one can specify multiple bind_to_addresses
git-svn-id: https://svn.musicpd.org/mpd/trunk@2501 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
@@ -337,8 +337,7 @@ void addInterfacesReadyToReadAndListenSocketToFdSet(fd_set * fds, int * fdmax) {
|
||||
int i;
|
||||
|
||||
FD_ZERO(fds);
|
||||
FD_SET(listenSocket,fds);
|
||||
if(*fdmax<listenSocket) *fdmax = listenSocket;
|
||||
addListenSocketsToFdSet(fds, fdmax);
|
||||
|
||||
for(i=0;i<interface_max_connections;i++) {
|
||||
if(interfaces[i].open && !interfaces[i].expired && !interfaces[i].bufferList) {
|
||||
@@ -396,7 +395,7 @@ int doIOForInterfaces() {
|
||||
addInterfacesForBufferFlushToFdSet(&wfds,&fdmax);
|
||||
|
||||
while((selret = select(fdmax+1,&rfds,&wfds,NULL,&tv))) {
|
||||
if(FD_ISSET(listenSocket,&rfds)) getConnections(listenSocket);
|
||||
getConnections(&rfds);
|
||||
if(selret<0 && errno==EINTR) break;
|
||||
else if(selret<0) {
|
||||
closeNextErroredInterface();
|
||||
|
||||
Reference in New Issue
Block a user