/*
* Initialize callback socket
*/
-static int
-get_socket(void)
+int
+statd_get_socket(int port)
{
struct sockaddr_in sin;
memset(&sin, 0, sizeof(sin));
sin.sin_family = AF_INET;
+ sin.sin_port = port;
if (bindresvport(sockfd, &sin) < 0) {
dprintf(L_WARNING,
"process_hosts: can't bind to reserved port\n");
time_t now;
int fd;
- if ((fd = get_socket()) < 0)
+ if ((fd = statd_get_socket(0)) < 0)
return 0;
while ((entry = notify) != NULL && NL_WHEN(entry) < time(&now)) {