In ypxfr_callback(), the failure to create an RPC CLIENT * handle for

the callback is a fatal error for this function; return immediatlely if
this happens. Also make the "failed to establish callback handle" error
mesaage print the IP address of the target callback host.
This commit is contained in:
Bill Paul 1996-10-23 15:49:22 +00:00
parent 511db384cf
commit 746c49fb53
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=19131

View File

@ -45,7 +45,7 @@
#include <rpc/rpc.h>
#ifndef lint
static const char rcsid[] = "$Id: yp_server.c,v 1.9 1996/04/28 04:38:52 wpaul Exp $";
static const char rcsid[] = "$Id: yp_server.c,v 1.10 1996/05/31 16:01:51 wpaul Exp $";
#endif /* not lint */
int forked = 0;
@ -295,9 +295,11 @@ static void ypxfr_callback(rval,addr,transid,prognum,port)
timeout.tv_usec = 0;
addr->sin_port = htons(port);
if ((clnt = clntudp_create(addr, prognum, 1, timeout, &sock)) == NULL)
yp_error("%s", clnt_spcreateerror("failed to establish \
callback handle"));
if ((clnt = clntudp_create(addr,prognum,1,timeout,&sock)) == NULL) {
yp_error("%s: %s", inet_ntoa(addr->sin_addr),
clnt_spcreateerror("failed to establish callback handle"));
return;
}
ypxfr_resp.status = rval;
ypxfr_resp.transid = transid;