git.samba.org
/
kai
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3b29c9c
)
r24629: Make read_sock return the total number of bytes read instead
author
Michael Adam
<obnox@samba.org>
Wed, 22 Aug 2007 13:51:44 +0000
(13:51 +0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 17:30:11 +0000
(12:30 -0500)
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
0193a49223c6314e2834c89fff9920ae7edc4f8a
)
source3/nsswitch/wb_common.c
patch
|
blob
|
history
diff --git
a/source3/nsswitch/wb_common.c
b/source3/nsswitch/wb_common.c
index 52913668e588afb03c660abaac3acbaf2da8bb6e..5072b81515f3eef064c061d499847724f4e890ca 100644
(file)
--- a/
source3/nsswitch/wb_common.c
+++ b/
source3/nsswitch/wb_common.c
@@
-420,7
+420,7
@@
int write_sock(void *buffer, int count, int recursing, int need_priv)
static int read_sock(void *buffer, int count)
{
- int
result = 0,
nread = 0;
+ int nread = 0;
int total_time = 0, selret;
if (winbindd_fd == -1) {
@@
-461,7
+461,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)) {
@@
-479,7
+479,7
@@
static int read_sock(void *buffer, int count)
}
}
- return
result
;
+ return
nread
;
}
/* Read reply */