Age | Commit message (Collapse) | Author | Files | Lines |
|
The writev system call can return -1 and errno ENOMEM, as a
retriable condition.
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Mar 13 23:50:05 CET 2013 on sn-devel-104
|
|
This matches what was done for lib/socket/socket_unix.c in
c692bb02b039ae8fef6ba968fd13b36ad7d62a72.
(and is based on that patch by Landon Fuller <landonf@bikemonkey.org>)
Andrew Bartlett
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Mar 4 11:15:35 CET 2013 on sn-devel-104
|
|
Once we've got the first part of a pdu we try to optimize
readv calls for the rest of the pdu.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
|
|
We only do the optimization on recvfrom/readv if the caller asked for it.
This is needed because in most cases we preferr to flush send
buffers before receiving incoming requests.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
|
|
If the socket is not readable yet, we need to retry
if tsocket_bsd_pending() returns 0.
See also
https://lists.samba.org/archive/samba-technical/2012-October/087164.html
metze
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Oct 23 14:44:21 CEST 2012 on sn-devel-104
|
|
It's possible for a client to send 0 bytes in a UDP packet,
we need still need to call recvfrom() and skip the invalid
packet at a higher level. Otherwise the kernel receive queue
is blocked.
metze
|
|
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Apr 17 14:41:53 CEST 2012 on sn-devel-104
|
|
empty queue case
metze
|
|
This fixes a few Coverity errors
|
|
metze
|
|
The new waf-based build system now has all the same functionality, and
the old build system has been broken for quite some time.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Oct 31 02:01:44 UTC 2010 on sn-devel-104
|
|
local address
tstream_inet_tcp_connect_send() usually only gets no local port number
and it may use the wildcard address '0.0.0.0' or '::'.
tstream_inet_tcp_connect_recv() provides the used local address and port
which are used on the wire.
metze
|
|
metze
|
|
We got random double free errors, when getting events from
epoll_wait() and try to dereference the private talloc pointer
attached to it.
Before doing the close() in the tstream_disconnect_send() function
we need to delete the fd event.
commit 38f505530ba06323a56c7d3914630efffcd12629 only fixed it for
tdgram sockets.
metze
|
|
We got random double free errors, when getting events from
epoll_wait() and try to dereference the private talloc pointer
attached to it.
Before doing the close() in the tstream_disconnect_send() function
we need to delete the fd event.
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Sep 28 01:02:55 UTC 2010 on sn-devel-104
|
|
the code used this pattent:
if (fd < 0) {
...various cleanups...
return fd;
}
it is much clearer to do this:
if (fd < 0) {
...various cleanups...
return -1;
}
as otherwise when reading the code you think this function may return
a fd.
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
|
|
This reverts commit 3d4fb698660381e650d7caeb5b7cff12847c0fb8.
This was wrong... The problem was in the caller, sa_len is a macro on irix
metze
|
|
metze
|
|
|
|
|
|
|
|
|
|
|
|
|
|
metze
|
|
metze
|
|
This reverts commit 63fc3978089df403d7e63462593784ff3d05e6e7.
We now don't support IPv6 when IPV6_V6ONLY isn't available,
as we rely on the behavior.
metze
|
|
metze
|
|
The previous code assumed the OS would happily accept sizeof(struct
sockaddr_storage). It seems some versions of Solaris do not like
this.
Andrew Bartlett
|
|
we won't be using the mk -> wscript generator again
|
|
them
|
|
|
|
|
|
Signed-off-by: Stefan Metzmacher <metze@samba.org>
|
|
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
|
|
metze
|
|
Which was:
tsocket/bsd: fix bug #7115 FreeBSD includes the UDP header in FIONREAD
Metze, this has to have been wrong - you are throwing away the talloc_realloc
pointer returned. Also no error checking. Please review.
Thank goodness for gcc warnings :-).
Jeremy.
|
|
metze
|
|
Some system already have this as default. It's easier
to behave the same way on all systems and handle ipv6
and ipv4 sockets separate.
metze
|
|
address if the local address is any
metze
|
|
tstream_bsd_connect_send()
This is needed because, we can't use sizeof(sockaddr_storage) for AF_UNIX
sockets. Also some platforms require exact values for AF_INET and AF_INET6.
metze
|
|
We want the explicit bind() when we don't use the any address.
metze
|
|
|
|
|
|
Signed-off-by: Stefan Metzmacher <metze@samba.org>
|
|
Signed-off-by: Stefan Metzmacher <metze@samba.org>
|
|
This makes sure we fill the unspefic bytes with 0
and have zero termination for sockaddr_un.
metze
|
|
This is needed as getpeername() truncates the length to 2 if the
peer socket has no name.
metze
|
|
|
|
|