Subject: bin/4411: rpcgen sample server code doesn't compile
To: None <gnats-bugs@gnats.netbsd.org>
From: Greg Hudson <ghudson@mit.edu>
List: netbsd-bugs
Date: 11/01/1997 13:54:49
>Number: 4411
>Category: bin
>Synopsis: sample server code doesn't use _svc routines
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Nov 1 11:05:00 1997
>Last-Modified:
>Originator: Greg Hudson
>Organization:
MIT
>Release: October 4, 1997 or thereabouts
>Environment:
System: NetBSD lola-granola.mit.edu 1.2G NetBSD 1.2G (LOLA-GRANOLA) #0: Sat Oct 4 18:21:18 EDT 1997 mycroft@zygorthian-space-raiders.mit.edu:/u2/src-virgin/sys/arch/i386/compile/LOLA-GRANOLA i386
>Description:
A while back, rpcgen was changed to always distinguish client calls from
server handlers, since they take different arguments. However, the
sample server code generated by -Ss never reflected that change.
>How-To-Repeat:
rpcgen /usr/include/rpcsvc/rwall.x
rpcgen -Ss /usr/include/rpcsvc/rwall.x > s.c
cc -c s.c
and notice that it doesn't compile.
>Fix:
Very straightforward:
Index: rpc_sample.c
===================================================================
RCS file: /cvsroot/src/usr.bin/rpcgen/rpc_sample.c,v
retrieving revision 1.5
diff -c -r1.5 rpc_sample.c
*** rpc_sample.c 1997/10/18 10:54:01 1.5
--- rpc_sample.c 1997/11/01 18:51:03
***************
*** 183,192 ****
*/
return_type(proc);
f_print(fout, "*\n");
! if (Cflag)
! pvname_svc(proc->proc_name, vp->vers_num);
! else
! pvname(proc->proc_name, vp->vers_num);
printarglist(proc, RQSTP, "struct svc_req *");
f_print(fout, "{\n");
--- 183,189 ----
*/
return_type(proc);
f_print(fout, "*\n");
! pvname_svc(proc->proc_name, vp->vers_num);
printarglist(proc, RQSTP, "struct svc_req *");
f_print(fout, "{\n");
>Audit-Trail:
>Unformatted: