Stop callbootd from dumping core when attempting to directly query a

bootparam server on a host that isn't running bootparamd: if clnt_create()
comes back with a NULL pointer, bail out with an error.
This commit is contained in:
wpaul 1995-03-26 03:15:39 +00:00
parent 41b7559ce7
commit 91aac05da2

View File

@ -5,7 +5,7 @@ use and modify. Please send modifications and/or suggestions + bug fixes to
Klas Heggemann <klas@nada.kth.se>
$Id$
$Id: callbootd.c,v 1.1.1.1 1995/02/26 23:40:53 wpaul Exp $
*/
@ -90,6 +90,11 @@ char **argv;
clnt = clnt_create(server,BOOTPARAMPROG, BOOTPARAMVERS, "udp");
}
if ( clnt == NULL ) {
fprintf (stderr, "%s: could not contact bootparam server on host %s\n",
argv[0], server);
exit (1);
}
switch (argc) {
case 3: