The ypbind_setdom_2 procedure returns NULL in the success case. This is

incorrect; returning NULL here means that the dispatcher won't send any
response back to the caller, which means the caller will sit there waiting
until it times out. I don't know how this ever worked before. The effect
is that using 'ypset foo' to get the local ypbind to change servers would
work, but would sit there hanging for a long time for no reason.
This commit is contained in:
Bill Paul 1999-02-10 20:04:22 +00:00
parent 71b785ff18
commit 5a21993c2d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=43854

View File

@ -29,7 +29,7 @@
#ifndef lint
static const char rcsid[] =
"$Id: ypbind.c,v 1.26 1997/10/27 07:45:47 charnier Exp $";
"$Id: ypbind.c,v 1.27 1998/01/19 23:31:38 wpaul Exp $";
#endif /* not lint */
#include <sys/param.h>
@ -247,6 +247,7 @@ ypbind_setdom *argp;
CLIENT *clnt;
{
struct sockaddr_in *fromsin, bindsin;
static char *result = NULL;
if (strchr(argp->ypsetdom_domain, '/')) {
syslog(LOG_WARNING, "Domain name '%s' has embedded slash -- \
@ -286,7 +287,7 @@ rejecting.", argp->ypsetdom_domain);
bindsin.sin_port = *(u_short *)argp->ypsetdom_binding.ypbind_binding_port;
rpc_received(argp->ypsetdom_domain, &bindsin, 1);
return(NULL);
return((void *) &result);
}
static void