Make RPC timeout message more readable.
Supply proc pointer to sosend.
This commit is contained in:
parent
8f112745af
commit
f6ee793a3c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=67529
@ -204,6 +204,7 @@ krpc_call(sa, prog, vers, func, data, from_p, procp)
|
||||
int error, rcvflg, timo, secs, len;
|
||||
static u_int32_t xid = ~0xFF;
|
||||
u_int16_t tport;
|
||||
u_int32_t saddr;
|
||||
|
||||
/*
|
||||
* Validate address family.
|
||||
@ -320,7 +321,7 @@ krpc_call(sa, prog, vers, func, data, from_p, procp)
|
||||
goto out;
|
||||
}
|
||||
error = sosend(so, (struct sockaddr *)sa, NULL, m,
|
||||
NULL, 0, 0);
|
||||
NULL, 0, procp);
|
||||
if (error) {
|
||||
printf("krpc_call: sosend: %d\n", error);
|
||||
goto out;
|
||||
@ -330,9 +331,14 @@ krpc_call(sa, prog, vers, func, data, from_p, procp)
|
||||
/* Determine new timeout. */
|
||||
if (timo < MAX_RESEND_DELAY)
|
||||
timo++;
|
||||
else
|
||||
printf("RPC timeout for server 0x%lx\n",
|
||||
(u_long)ntohl(sa->sin_addr.s_addr));
|
||||
else {
|
||||
saddr = ntohl(sa->sin_addr.s_addr);
|
||||
printf("RPC timeout for server %d.%d.%d.%d\n",
|
||||
(saddr >> 24) & 255,
|
||||
(saddr >> 16) & 255,
|
||||
(saddr >> 8) & 255,
|
||||
saddr & 255);
|
||||
}
|
||||
|
||||
/*
|
||||
* Wait for up to timo seconds for a reply.
|
||||
|
@ -204,6 +204,7 @@ krpc_call(sa, prog, vers, func, data, from_p, procp)
|
||||
int error, rcvflg, timo, secs, len;
|
||||
static u_int32_t xid = ~0xFF;
|
||||
u_int16_t tport;
|
||||
u_int32_t saddr;
|
||||
|
||||
/*
|
||||
* Validate address family.
|
||||
@ -320,7 +321,7 @@ krpc_call(sa, prog, vers, func, data, from_p, procp)
|
||||
goto out;
|
||||
}
|
||||
error = sosend(so, (struct sockaddr *)sa, NULL, m,
|
||||
NULL, 0, 0);
|
||||
NULL, 0, procp);
|
||||
if (error) {
|
||||
printf("krpc_call: sosend: %d\n", error);
|
||||
goto out;
|
||||
@ -330,9 +331,14 @@ krpc_call(sa, prog, vers, func, data, from_p, procp)
|
||||
/* Determine new timeout. */
|
||||
if (timo < MAX_RESEND_DELAY)
|
||||
timo++;
|
||||
else
|
||||
printf("RPC timeout for server 0x%lx\n",
|
||||
(u_long)ntohl(sa->sin_addr.s_addr));
|
||||
else {
|
||||
saddr = ntohl(sa->sin_addr.s_addr);
|
||||
printf("RPC timeout for server %d.%d.%d.%d\n",
|
||||
(saddr >> 24) & 255,
|
||||
(saddr >> 16) & 255,
|
||||
(saddr >> 8) & 255,
|
||||
saddr & 255);
|
||||
}
|
||||
|
||||
/*
|
||||
* Wait for up to timo seconds for a reply.
|
||||
|
Loading…
Reference in New Issue
Block a user