Deleted Added
full compact
procs.c (50479) procs.c (92970)
1/*
2 * Copyright (c) 1995
3 * A.R. Gordon (andrew.gordon@net-tel.co.uk). All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 19 unchanged lines hidden (view full) ---

28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 */
33
34#ifndef lint
35static const char rcsid[] =
1/*
2 * Copyright (c) 1995
3 * A.R. Gordon (andrew.gordon@net-tel.co.uk). All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 19 unchanged lines hidden (view full) ---

28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 */
33
34#ifndef lint
35static const char rcsid[] =
36 "$FreeBSD: head/usr.sbin/rpc.statd/procs.c 50479 1999-08-28 01:35:59Z peter $";
36 "$FreeBSD: head/usr.sbin/rpc.statd/procs.c 92970 2002-03-22 19:43:21Z alfred $";
37#endif /* not lint */
38
39#include <errno.h>
40#include <stdio.h>
41#include <stdlib.h>
42#include <string.h>
43#include <unistd.h>
44#include <rpc/rpc.h>

--- 251 unchanged lines hidden (view full) ---

296 that modify the list.
297*/
298
299void *sm_notify_1_svc(stat_chge *arg, struct svc_req *req)
300{
301 struct timeval timeout = { 20, 0 }; /* 20 secs timeout */
302 CLIENT *cli;
303 static char dummy;
37#endif /* not lint */
38
39#include <errno.h>
40#include <stdio.h>
41#include <stdlib.h>
42#include <string.h>
43#include <unistd.h>
44#include <rpc/rpc.h>

--- 251 unchanged lines hidden (view full) ---

296 that modify the list.
297*/
298
299void *sm_notify_1_svc(stat_chge *arg, struct svc_req *req)
300{
301 struct timeval timeout = { 20, 0 }; /* 20 secs timeout */
302 CLIENT *cli;
303 static char dummy;
304 status tx_arg; /* arg sent to callback procedure */
304 sm_status tx_arg; /* arg sent to callback procedure */
305 MonList *lp;
306 HostInfo *hp;
307 pid_t pid;
308
309 if (debug) syslog(LOG_DEBUG, "notify from host %s, new state %d",
310 arg->mon_name, arg->state);
311
312 hp = find_host(arg->mon_name, FALSE);

--- 22 unchanged lines hidden (view full) ---

335 cli = clnt_create(lp->notifyHost, lp->notifyProg, lp->notifyVers, "udp");
336 if (!cli)
337 {
338 syslog(LOG_ERR, "Failed to contact host %s%s", lp->notifyHost,
339 clnt_spcreateerror(""));
340 }
341 else
342 {
305 MonList *lp;
306 HostInfo *hp;
307 pid_t pid;
308
309 if (debug) syslog(LOG_DEBUG, "notify from host %s, new state %d",
310 arg->mon_name, arg->state);
311
312 hp = find_host(arg->mon_name, FALSE);

--- 22 unchanged lines hidden (view full) ---

335 cli = clnt_create(lp->notifyHost, lp->notifyProg, lp->notifyVers, "udp");
336 if (!cli)
337 {
338 syslog(LOG_ERR, "Failed to contact host %s%s", lp->notifyHost,
339 clnt_spcreateerror(""));
340 }
341 else
342 {
343 if (clnt_call(cli, lp->notifyProc, xdr_status, &tx_arg, xdr_void, &dummy,
344 timeout) != RPC_SUCCESS)
343 if (clnt_call(cli, lp->notifyProc, xdr_sm_status, &tx_arg, xdr_void,
344 &dummy, timeout) != RPC_SUCCESS)
345 {
346 syslog(LOG_ERR, "Failed to call rpc.statd client at host %s",
347 lp->notifyHost);
348 }
349 clnt_destroy(cli);
350 }
351 lp = lp->next;
352 }
353
354 exit (0); /* Child quits */
355}
345 {
346 syslog(LOG_ERR, "Failed to call rpc.statd client at host %s",
347 lp->notifyHost);
348 }
349 clnt_destroy(cli);
350 }
351 lp = lp->next;
352 }
353
354 exit (0); /* Child quits */
355}