rstat_proc.c (90336) | rstat_proc.c (95658) |
---|---|
1/* 2 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 3 * unrestricted use provided that this legend is included on all tape 4 * media and as a part of the software program in whole or part. Users 5 * may copy or modify Sun RPC without charge, but are not authorized 6 * to license or distribute it to anyone else except as part of a product or 7 * program developed by the user. 8 * --- 19 unchanged lines hidden (view full) --- 28 */ 29 30#ifndef lint 31#if 0 32static char sccsid[] = "from: @(#)rpc.rstatd.c 1.1 86/09/25 Copyr 1984 Sun Micro"; 33static char sccsid[] = "from: @(#)rstat_proc.c 2.2 88/08/01 4.0 RPCSRC"; 34#endif 35static const char rcsid[] = | 1/* 2 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 3 * unrestricted use provided that this legend is included on all tape 4 * media and as a part of the software program in whole or part. Users 5 * may copy or modify Sun RPC without charge, but are not authorized 6 * to license or distribute it to anyone else except as part of a product or 7 * program developed by the user. 8 * --- 19 unchanged lines hidden (view full) --- 28 */ 29 30#ifndef lint 31#if 0 32static char sccsid[] = "from: @(#)rpc.rstatd.c 1.1 86/09/25 Copyr 1984 Sun Micro"; 33static char sccsid[] = "from: @(#)rstat_proc.c 2.2 88/08/01 4.0 RPCSRC"; 34#endif 35static const char rcsid[] = |
36 "$FreeBSD: head/libexec/rpc.rstatd/rstat_proc.c 90336 2002-02-07 05:24:53Z imp $"; | 36 "$FreeBSD: head/libexec/rpc.rstatd/rstat_proc.c 95658 2002-04-28 15:18:50Z des $"; |
37#endif 38 39/* 40 * rstat service: built with rstat.x and derived from rpc.rstatd.c 41 * 42 * Copyright (c) 1984 by Sun Microsystems, Inc. 43 */ 44 --- 388 unchanged lines hidden (view full) --- 433 int fill; 434 } argument; 435 char *result; 436 bool_t (*xdr_argument)(), (*xdr_result)(); 437 char *(*local)(); 438 439 switch (rqstp->rq_proc) { 440 case NULLPROC: | 37#endif 38 39/* 40 * rstat service: built with rstat.x and derived from rpc.rstatd.c 41 * 42 * Copyright (c) 1984 by Sun Microsystems, Inc. 43 */ 44 --- 388 unchanged lines hidden (view full) --- 433 int fill; 434 } argument; 435 char *result; 436 bool_t (*xdr_argument)(), (*xdr_result)(); 437 char *(*local)(); 438 439 switch (rqstp->rq_proc) { 440 case NULLPROC: |
441 (void)svc_sendreply(transp, xdr_void, (char *)NULL); | 441 (void)svc_sendreply(transp, (xdrproc_t)xdr_void, NULL); |
442 goto leave; 443 444 case RSTATPROC_STATS: 445 xdr_argument = xdr_void; 446 xdr_result = xdr_statstime; 447 switch (rqstp->rq_vers) { 448 case RSTATVERS_ORIG: 449 local = (char *(*)()) rstatproc_stats_1_svc; --- 31 unchanged lines hidden (view full) --- 481 } 482 break; 483 484 default: 485 svcerr_noproc(transp); 486 goto leave; 487 } 488 bzero((char *)&argument, sizeof(argument)); | 442 goto leave; 443 444 case RSTATPROC_STATS: 445 xdr_argument = xdr_void; 446 xdr_result = xdr_statstime; 447 switch (rqstp->rq_vers) { 448 case RSTATVERS_ORIG: 449 local = (char *(*)()) rstatproc_stats_1_svc; --- 31 unchanged lines hidden (view full) --- 481 } 482 break; 483 484 default: 485 svcerr_noproc(transp); 486 goto leave; 487 } 488 bzero((char *)&argument, sizeof(argument)); |
489 if (!svc_getargs(transp, xdr_argument, (caddr_t)&argument)) { | 489 if (!svc_getargs(transp, (xdrproc_t)xdr_argument, &argument)) { |
490 svcerr_decode(transp); 491 goto leave; 492 } 493 result = (*local)(&argument, rqstp); | 490 svcerr_decode(transp); 491 goto leave; 492 } 493 result = (*local)(&argument, rqstp); |
494 if (result != NULL && !svc_sendreply(transp, xdr_result, result)) { | 494 if (result != NULL && 495 !svc_sendreply(transp, (xdrproc_t)xdr_result, result)) { |
495 svcerr_systemerr(transp); 496 } | 496 svcerr_systemerr(transp); 497 } |
497 if (!svc_freeargs(transp, xdr_argument, (caddr_t)&argument)) | 498 if (!svc_freeargs(transp, (xdrproc_t)xdr_argument, &argument)) |
498 errx(1, "unable to free arguments"); 499leave: 500 if (from_inetd) 501 exit(0); 502} | 499 errx(1, "unable to free arguments"); 500leave: 501 if (from_inetd) 502 exit(0); 503} |