summaryrefslogtreecommitdiff
path: root/server/bdump.c
diff options
context:
space:
mode:
authorGravatar John Kohl <jtkohl@mit.edu>1988-02-05 19:07:00 +0000
committerGravatar John Kohl <jtkohl@mit.edu>1988-02-05 19:07:00 +0000
commit9643b66e425864e859b22cfb463f5763eb9960f7 (patch)
tree243d0df07a99833387941b2a2031f91af14f65ac /server/bdump.c
parentf2a3cfa422369b4b2fd0ff38565488b3c36b5d54 (diff)
fix problem with net_write
Add extra info for debugging.
Diffstat (limited to 'server/bdump.c')
-rw-r--r--server/bdump.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/server/bdump.c b/server/bdump.c
index 24ce03f..4faf772 100644
--- a/server/bdump.c
+++ b/server/bdump.c
@@ -294,7 +294,8 @@ ZServerDesc_t *server;
int reserved_port = IPPORT_RESERVED - 1;
#endif KERBEROS
- zdbug((LOG_DEBUG, "bdump avail"));
+ if (zdebug)
+ (LOG_DEBUG, "bdump avail %s",inet_ntoa(who->sin_addr));
/* version number 1 is the same as no version number */
if (strcmp(notice->z_class_inst, "1")
@@ -1144,17 +1145,18 @@ static int
net_write(fd, buf, len)
int fd;
register char *buf;
-register int len;
+int len;
{
int cc;
+ register int wrlen = len;
do {
- cc = write(fd, buf, len);
+ cc = write(fd, buf, wrlen);
if (cc < 0)
return(cc);
else {
buf += cc;
- len -= cc;
+ wrlen -= cc;
}
- } while (len > 0);
+ } while (wrlen > 0);
return(len);
}