Make RPC timeout message more readable.

Supply proc pointer to sosend.
This commit is contained in:
Tor Egge 2000-10-24 22:37:55 +00:00
parent 8f112745af
commit f6ee793a3c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=67529
2 changed files with 20 additions and 8 deletions

View File

@ -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.

View File

@ -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.