X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fstatd%2Frmtcall.c;h=b70e5bb701e829a391ff6fda47abd10239fab4cb;hp=f01faba06e1a7be80a5c0c3c344cccc1fd58e776;hb=b63400dcb05eee79666bade57558279fd15f0318;hpb=919f0cf78ab9d180fb11beb9c8d6c9dcefa6df9a diff --git a/utils/statd/rmtcall.c b/utils/statd/rmtcall.c index f01faba..b70e5bb 100644 --- a/utils/statd/rmtcall.c +++ b/utils/statd/rmtcall.c @@ -47,8 +47,8 @@ static int sockfd = -1; /* notify socket */ /* * Initialize callback socket */ -int -statd_get_socket(int port) +static int +get_socket(void) { struct sockaddr_in sin; @@ -64,7 +64,6 @@ statd_get_socket(int port) 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"); @@ -395,7 +394,7 @@ process_notify_list(void) time_t now; int fd; - if ((fd = statd_get_socket(0)) < 0) + if ((fd = get_socket()) < 0) return 0; while ((entry = notify) != NULL && NL_WHEN(entry) < time(&now)) {