Removing the getBoundPort() function and just making boundPort an extern.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6445 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
485d1f68dd
commit
88638f4821
@ -48,7 +48,7 @@
|
||||
|
||||
static int *listenSockets;
|
||||
static int numberOfListenSockets;
|
||||
static int boundPort;
|
||||
int boundPort;
|
||||
|
||||
static int establishListen(unsigned int port,
|
||||
struct sockaddr *addrp, socklen_t addrlen)
|
||||
@ -251,8 +251,3 @@ void getConnections(fd_set * fds)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int getBoundPort(void)
|
||||
{
|
||||
return boundPort;
|
||||
}
|
||||
|
@ -26,6 +26,8 @@
|
||||
#include <unistd.h>
|
||||
#include <sys/select.h>
|
||||
|
||||
extern int boundPort;
|
||||
|
||||
void listenOnPort(void);
|
||||
|
||||
void getConnections(fd_set * fds);
|
||||
@ -36,6 +38,4 @@ void freeAllListenSockets(void);
|
||||
/* fdmax should be initialized to something */
|
||||
void addListenSocketsToFdSet(fd_set * fds, int *fdmax);
|
||||
|
||||
int getBoundPort(void);
|
||||
|
||||
#endif
|
||||
|
@ -255,7 +255,7 @@ static void avahiRegisterService(AvahiClient *c)
|
||||
AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0,
|
||||
avahiName, SERVICE_TYPE,
|
||||
NULL, NULL,
|
||||
getBoundPort(),
|
||||
boundPort,
|
||||
NULL);
|
||||
if( ret < 0 ) {
|
||||
ERROR( "Avahi: Failed to add service %s: %s\n", SERVICE_TYPE, avahi_strerror(ret) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user