git.samba.org
/
abartlet
/
samba.git
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ffcb99
)
tsocket/bsd: fix bug #7115 FreeBSD includes the UDP header in FIONREAD
author
Stefan Metzmacher
<metze@samba.org>
Wed, 17 Feb 2010 12:53:02 +0000
(13:53 +0100)
committer
Stefan Metzmacher
<metze@samba.org>
Wed, 17 Feb 2010 13:46:39 +0000
(14:46 +0100)
metze
lib/tsocket/tsocket_bsd.c
patch
|
blob
|
history
diff --git
a/lib/tsocket/tsocket_bsd.c
b/lib/tsocket/tsocket_bsd.c
index 13680ec0c54793d71cc8bbb0d777f3f84155a9db..9027bc97114f0b10286ede18b416f2ead919bc96 100644
(file)
--- a/
lib/tsocket/tsocket_bsd.c
+++ b/
lib/tsocket/tsocket_bsd.c
@@
-883,10
+883,12
@@
static void tdgram_bsd_recvfrom_handler(void *private_data)
return;
}
- if (ret != state->len) {
- tevent_req_error(req, EIO);
- return;
- }
+ /*
+ * some systems too much bytes in tsocket_bsd_pending()
+ * the return value includes some IP/UDP header bytes
+ */
+ state->len = ret;
+ talloc_realloc(state, state->buf, uint8_t, ret);
tevent_req_done(req);
}