Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160544049
D54941.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D54941.id.diff
View Options
diff --git a/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c b/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c
--- a/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c
+++ b/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c
@@ -39,7 +39,8 @@
#define RPCBPROC_NULL 0
static int
-reply(caddr_t replyp, struct netbuf * raddrp, struct netconfig * nconf)
+reply(caddr_t replyp, const struct netbuf * raddrp,
+ const struct netconfig * nconf)
{
char host[NI_MAXHOST];
struct sockaddr *sock = raddrp->buf;
@@ -244,7 +245,7 @@
clnt_stat = rpc_broadcast(RPCBPROG, RPCBVERS, RPCBPROC_NULL,
(xdrproc_t)xdr_void, NULL, (xdrproc_t)xdr_void,
- NULL, (resultproc_t)reply, transp);
+ NULL, reply, transp);
if (clnt_stat != RPC_SUCCESS && clnt_stat != RPC_TIMEDOUT)
ERRX(EXIT_FAILURE, "%s", clnt_sperrno(clnt_stat));
}
diff --git a/include/rpc/clnt.h b/include/rpc/clnt.h
--- a/include/rpc/clnt.h
+++ b/include/rpc/clnt.h
@@ -514,7 +514,8 @@
* const char *nettype; -- Transport type
*/
-typedef bool_t (*resultproc_t)(caddr_t, ...);
+typedef bool_t (*resultproc_t)(caddr_t, const struct netbuf *,
+ const struct netconfig *);
__BEGIN_DECLS
extern enum clnt_stat rpc_broadcast(const rpcprog_t, const rpcvers_t,
diff --git a/lib/libc/rpc/rpc_soc.c b/lib/libc/rpc/rpc_soc.c
--- a/lib/libc/rpc/rpc_soc.c
+++ b/lib/libc/rpc/rpc_soc.c
@@ -72,7 +72,8 @@
static CLIENT *clnt_com_create(struct sockaddr_in *, rpcprog_t, rpcvers_t,
int *, u_int, u_int, char *);
static SVCXPRT *svc_com_create(int, u_int, u_int, char *);
-static bool_t rpc_wrap_bcast(char *, struct netbuf *, struct netconfig *);
+static bool_t rpc_wrap_bcast(char *, const struct netbuf *,
+ const struct netconfig *);
/* XXX */
#define IN4_LOCALHOST_STRING "127.0.0.1"
@@ -318,7 +319,8 @@
*/
/* ARGSUSED */
static bool_t
-rpc_wrap_bcast(char *resultp, struct netbuf *addr, struct netconfig *nconf)
+rpc_wrap_bcast(char *resultp, const struct netbuf *addr,
+ const struct netconfig *nconf)
/*
* char *resultp; // results of the call
* struct netbuf *addr; // address of the guy who responded
@@ -355,7 +357,7 @@
ret = rpc_broadcast((rpcprog_t)prog, (rpcvers_t)vers,
(rpcproc_t)proc, xargs, argsp, xresults, resultsp,
- (resultproc_t) rpc_wrap_bcast, "udp");
+ rpc_wrap_bcast, "udp");
clnt_broadcast_result = NULL;
return (ret);
diff --git a/usr.bin/rpcinfo/rpcinfo.c b/usr.bin/rpcinfo/rpcinfo.c
--- a/usr.bin/rpcinfo/rpcinfo.c
+++ b/usr.bin/rpcinfo/rpcinfo.c
@@ -125,7 +125,8 @@
static void get_inet_address(struct sockaddr_in *, char *);
#endif
-static bool_t reply_proc(void *, struct netbuf *, struct netconfig *);
+static bool_t reply_proc(char *, const struct netbuf *,
+ const struct netconfig *);
static void brdcst(int, char **);
static void addrping(char *, char *, int, char **);
static void progping(char *, int, char **);
@@ -584,7 +585,8 @@
/*ARGSUSED*/
static bool_t
-reply_proc(void *res, struct netbuf *who, struct netconfig *nconf)
+reply_proc(char *res __unused, const struct netbuf *who,
+ const struct netconfig *nconf)
/* void *res; Nothing comes back */
/* struct netbuf *who; Who sent us the reply */
/* struct netconfig *nconf; On which transport the reply came */
@@ -621,7 +623,7 @@
vers = getvers(argv[1]);
rpc_stat = rpc_broadcast(prognum, vers, NULLPROC,
(xdrproc_t) xdr_void, (char *)NULL, (xdrproc_t) xdr_void,
- (char *)NULL, (resultproc_t) reply_proc, NULL);
+ (char *)NULL, reply_proc, NULL);
if ((rpc_stat != RPC_SUCCESS) && (rpc_stat != RPC_TIMEDOUT))
errx(1, "broadcast failed: %s", clnt_sperrno(rpc_stat));
exit(0);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jun 26, 12:49 PM (14 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34357714
Default Alt Text
D54941.id.diff (3 KB)
Attached To
Mode
D54941: rpc: correct resultproc_t's type
Attached
Detach File
Event Timeline
Log In to Comment