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:
Warren Dukes
2004-11-03 19:42:54 +00:00
parent 16335ba097
commit 405ad9e58b
7 changed files with 97 additions and 48 deletions

View File

@@ -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();