summaryrefslogtreecommitdiffstats
path: root/source4/nsswitch
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2007-08-22 13:51:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:02:26 -0500
commit32ce9de932c3f08b728bd9c743c70d702dc68a88 (patch)
treea3ee1e49182a73f757561c6061f3d49cbc38af53 /source4/nsswitch
parent69de8f9ac8eaa9bb8ec12facb66fe3e26de5f47c (diff)
downloadsamba-32ce9de932c3f08b728bd9c743c70d702dc68a88.tar.gz
samba-32ce9de932c3f08b728bd9c743c70d702dc68a88.tar.xz
samba-32ce9de932c3f08b728bd9c743c70d702dc68a88.zip
r24629: Make read_sock return the total number of bytes read instead
of the number of bytes read in the last of possibly several read calls. This was noted by Metze. Michael (This used to be commit 37363307c6cbe28f1ca7135ca501d8c0dcd4c6d7)
Diffstat (limited to 'source4/nsswitch')
-rw-r--r--source4/nsswitch/wb_common.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/nsswitch/wb_common.c b/source4/nsswitch/wb_common.c
index e2b84e9f693..e8ea31db0fc 100644
--- a/source4/nsswitch/wb_common.c
+++ b/source4/nsswitch/wb_common.c
@@ -421,7 +421,7 @@ int write_sock(void *buffer, int count)
static int read_sock(void *buffer, int count)
{
- int result = 0, nread = 0;
+ int nread = 0;
int total_time = 0, selret;
/* Read data from socket */
@@ -458,7 +458,7 @@ static int read_sock(void *buffer, int count)
/* Do the Read */
- result = read(winbindd_fd, (char *)buffer + nread,
+ int result = read(winbindd_fd, (char *)buffer + nread,
count - nread);
if ((result == -1) || (result == 0)) {
@@ -476,7 +476,7 @@ static int read_sock(void *buffer, int count)
}
}
- return result;
+ return nread;
}
/* Read reply */