Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 175941
b: refs/heads/master
c: 5a46211
h: refs/heads/master
i:
  175939: 100ab46
v: v3
  • Loading branch information
Chuck Lever authored and Trond Myklebust committed Dec 3, 2009
1 parent b122499 commit 5b1fde0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 09a21c4102c8f7893368553273d39c0cadedf9af
refs/heads/master: 5a46211540a83871196489247f57da2bdde58d87
11 changes: 4 additions & 7 deletions trunk/net/sunrpc/rpcb_clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,12 @@ static const struct sockaddr_in rpcb_inaddr_loopback = {
.sin_port = htons(RPCBIND_PORT),
};

static struct rpc_clnt *rpcb_create_local(struct sockaddr *addr,
size_t addrlen, u32 version)
static struct rpc_clnt *rpcb_create_local(u32 version)
{
struct rpc_create_args args = {
.protocol = XPRT_TRANSPORT_UDP,
.address = addr,
.addrsize = addrlen,
.address = (struct sockaddr *)&rpcb_inaddr_loopback,
.addrsize = sizeof(rpcb_inaddr_loopback),
.servername = "localhost",
.program = &rpcb_program,
.version = version,
Expand Down Expand Up @@ -211,14 +210,12 @@ static struct rpc_clnt *rpcb_create(char *hostname, struct sockaddr *srvaddr,

static int rpcb_register_call(const u32 version, struct rpc_message *msg)
{
struct sockaddr *addr = (struct sockaddr *)&rpcb_inaddr_loopback;
size_t addrlen = sizeof(rpcb_inaddr_loopback);
struct rpc_clnt *rpcb_clnt;
int result, error = 0;

msg->rpc_resp = &result;

rpcb_clnt = rpcb_create_local(addr, addrlen, version);
rpcb_clnt = rpcb_create_local(version);
if (!IS_ERR(rpcb_clnt)) {
error = rpc_call_sync(rpcb_clnt, msg, 0);
rpc_shutdown_client(rpcb_clnt);
Expand Down

0 comments on commit 5b1fde0

Please sign in to comment.