From 9290f6560a540ba9252433828c608c83035ba823 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Mon, 2 Jul 2001 20:03:06 +0000 Subject: [PATCH] * rpc_test_svc.c: Change rpc_test_prog_1 to rpc_test_prog_1_svc. * rpc_test.h: Create prototypes for rpc_test_echo_1_svc and rpc_test_prog_1_svc. * server.c: Declare usage and handlesig static. Change rpc_test_echo_1 to rpc_test_echo_1_svc and rpc_test_prog_1 to rpc_test_prog_1_svc. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13547 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/rpc/unit-test/ChangeLog | 12 ++++++++++++ src/lib/rpc/unit-test/rpc_test.h | 5 +++-- src/lib/rpc/unit-test/rpc_test_svc.c | 4 ++-- src/lib/rpc/unit-test/server.c | 12 +++++------- 4 files changed, 22 insertions(+), 11 deletions(-) diff --git a/src/lib/rpc/unit-test/ChangeLog b/src/lib/rpc/unit-test/ChangeLog index ac312fdd2..dd63952d5 100644 --- a/src/lib/rpc/unit-test/ChangeLog +++ b/src/lib/rpc/unit-test/ChangeLog @@ -1,3 +1,15 @@ +2001-07-02 Ezra Peisach + + * rpc_test_svc.c: Change rpc_test_prog_1 to + rpc_test_prog_1_svc. + + * rpc_test.h: Create prototypes for rpc_test_echo_1_svc and + rpc_test_prog_1_svc. + + * server.c: Declare usage and handlesig static. Change + rpc_test_echo_1 to rpc_test_echo_1_svc and rpc_test_prog_1 to + rpc_test_prog_1_svc. + 2001-06-08 Ezra Peisach * client.c: Include unistd.h for getopt() prototype. diff --git a/src/lib/rpc/unit-test/rpc_test.h b/src/lib/rpc/unit-test/rpc_test.h index bd53c06f9..2ad039955 100644 --- a/src/lib/rpc/unit-test/rpc_test.h +++ b/src/lib/rpc/unit-test/rpc_test.h @@ -6,7 +6,8 @@ #define RPC_TEST_PROG ((unsigned long)(1000001)) #define RPC_TEST_VERS_1 ((unsigned long)(1)) #define RPC_TEST_ECHO ((unsigned long)(1)) -extern char ** rpc_test_echo_1(); -extern int rpc_test_prog_1_freeresult(); +extern char ** rpc_test_echo_1_svc(char **, struct svc_req *); +extern char ** rpc_test_echo_1(char **, CLIENT *); +extern void rpc_test_prog_1_svc(struct svc_req *, SVCXPRT *); #endif /* !_RPC_TEST_H_RPCGEN */ diff --git a/src/lib/rpc/unit-test/rpc_test_svc.c b/src/lib/rpc/unit-test/rpc_test_svc.c index 79f5e646a..0146784ae 100644 --- a/src/lib/rpc/unit-test/rpc_test_svc.c +++ b/src/lib/rpc/unit-test/rpc_test_svc.c @@ -20,7 +20,7 @@ void _msgout(msg) } void -rpc_test_prog_1(rqstp, transp) +rpc_test_prog_1_svc(rqstp, transp) struct svc_req *rqstp; register SVCXPRT *transp; { @@ -43,7 +43,7 @@ rpc_test_prog_1(rqstp, transp) case RPC_TEST_ECHO: xdr_argument = xdr_wrapstring; xdr_result = xdr_wrapstring; - local = (char *(*)()) rpc_test_echo_1; + local = (char *(*)()) rpc_test_echo_1_svc; break; default: diff --git a/src/lib/rpc/unit-test/server.c b/src/lib/rpc/unit-test/server.c index 115e1895e..33ea3a08b 100644 --- a/src/lib/rpc/unit-test/server.c +++ b/src/lib/rpc/unit-test/server.c @@ -25,8 +25,6 @@ static char *rcsid = "$Header$"; #include /* MAXHOSTNAMELEN */ #include "rpc_test.h" -extern void rpc_test_prog_1(); - extern int svc_debug_gssapi, misc_debug_gssapi; void rpc_test_badauth(OM_uint32 major, OM_uint32 minor, @@ -43,16 +41,16 @@ static void rpc_test_badverf(gss_name_t client, gss_name_t server, #define SERVICE_NAME "server" #endif -void usage() +static void usage() { fprintf(stderr, "Usage: server {-t|-u} [svc-debug] [misc-debug]\n"); exit(1); } #ifdef POSIX_SIGNALS -void handlesig(int dummy) +static void handlesig(int dummy) #else -void handlesig(void) +static void handlesig(void) #endif { exit(0); @@ -117,7 +115,7 @@ main(int argc, char **argv) exit(1); } if (!svc_register(transp, RPC_TEST_PROG, RPC_TEST_VERS_1, - rpc_test_prog_1, prot)) { + rpc_test_prog_1_svc, prot)) { fprintf(stderr, "unable to register (RPC_TEST_PROG, RPC_TEST_VERS_1, %s).", prot == IPPROTO_TCP ? "tcp" : "udp"); @@ -153,7 +151,7 @@ main(int argc, char **argv) /* NOTREACHED */ } -char **rpc_test_echo_1(char **arg, struct svc_req *h) +char **rpc_test_echo_1_svc(char **arg, struct svc_req *h) { static char *res = NULL; -- 2.26.2