summaryrefslogtreecommitdiff
path: root/lib/async_req/async_sock.c
AgeCommit message (Collapse)AuthorFilesLines
2013-05-17lib: Add before/after hooks to async_connectVolker Lendecke1-4/+31
This will facilitiate [un]become_root for smbd to connect safely to ctdbd. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org>
2012-03-23lib/async_req: Retry read_packet with read(2)Volker Lendecke1-0/+4
This way it will also work with pipes Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Fri Mar 23 17:31:24 CET 2012 on sn-devel-104
2011-09-23build: avoid util.h as a public header name due to conflict with MacOSAndrew Bartlett1-1/+1
2011-08-25s3: Fix bug 8385Volker Lendecke1-26/+14
Poll and select behave differently regarding error handling. When doing the connect(2), we can not rely on poll telling us both readability and writability upon error. Just always try a second connect(2). At least on Linux it returns 0 when it succeeded. Signed-off-by: Jeremy Allison <jra@samba.org> Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Thu Aug 25 19:39:12 CEST 2011 on sn-devel-104
2011-07-28Add wait_for_read_send/recvVolker Lendecke1-0/+55
Wait for readability of a socket as a tevent_req
2011-06-06Fix bug #8197 - winbind does not properly detect when a DC connection is dead.Jeremy Allison1-6/+32
Only waiting for writability doesn't get fd errors back with poll. So always begin by selecting for readability, and if we get it then see if bytes were available to read or it really is an error condition. If bytes were available, remove the select on read as we know we will retrieve the error when we've finished writing and start reading the reply (or the write will timeout or fail). Metze and Volker please check. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Mon Jun 6 21:53:16 CEST 2011 on sn-devel-104
2011-03-23async_rec/async_sock.c - add an additional "const"Matthias Dieter Wallnöfer1-1/+2
In order to suppress a build warning. Acked-by: Volker and Metze Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Wed Mar 23 10:26:23 CET 2011 on sn-devel-104
2010-12-29Use sockaddr_storage in async sendto/recvfromVolker Lendecke1-8/+25
2010-12-28async_send->sendto, async_recv->recvfromVolker Lendecke1-32/+42
2009-09-21async_sock: return -1/EPIPE if we're getting an end of file on read.Stefan Metzmacher1-0/+4
This makes the error handling in the callers easier. metze
2009-06-15Fix a = vs == error in writev_handlerVolker Lendecke1-1/+1
2009-06-08async_sock: try fix the source4 build on FreeBSD, Solaris, SLES8Stefan Metzmacher1-4/+8
metze
2009-06-06Fix an uninitialized variable read in async_connect_sendVolker Lendecke1-5/+5
2009-06-04Only err on readability if writev_send was explicitly asked to do soVolker Lendecke1-1/+1
A socket might be readable for other reasons
2009-05-30Handle EINTR in async_sock.cVolker Lendecke1-0/+16
2009-05-30libwbclient: Add async call framework.Kai Blin1-2/+2
2009-05-29async_sock: Change license to LGPLv3+Volker Lendecke1-8/+12
2009-05-24Change async_connect to use connect instead of getsockopt to get the errorVolker Lendecke1-14/+24
On my Linux box, this is definitely the more reliable strategy with unix domain sockets, and according to my tests it also works correctly with TCP sockets.
2009-05-24Add "err_on_readability" to writev_sendVolker Lendecke1-2/+13
A socket where the other side has closed only becomes readable. To catch errors early when sitting in a pure writev, we need to also test for readability.
2009-05-24Allow NULL queue to writev_sendVolker Lendecke1-6/+16
2009-04-08Remove async_reqVolker Lendecke1-50/+0
2009-04-05Use recv instead of read in read_packet_handlerVolker Lendecke1-1/+2
This way the socket wrapper pcap file also sees the replies :-)
2009-03-17Remove some transitional code in writev_sendVolker Lendecke1-17/+1
2009-03-11async_sock: fix truncating of the temporary iovec in writev_send/recv()Stefan Metzmacher1-1/+1
Volker: please check! metze
2009-03-08Add "queue" to writev_sendVolker Lendecke1-2/+28
Unless higher levels queue themselves somehow, writev will *always* be queued. So the queueing should be done at the right level.
2009-03-02Make struct tevent_req opaqueSimo Sorce1-20/+20
Move struct tevent_req in tevent_internal, and ad getters and setters for private data and the callback function. This patch also renames 'private_state' into 'data'. What is held in this pointer is in fact data and not a state like enum tevent_req_state. Calling it 'state' is confusing. The functions addedd are: tevent_req_set_callback() - sets req->async.fn and req->async.private_data tevent_req_set_print_fn() - sets req->private_print tevent_req_callback_data() - gets req->async.private_data tevent_req_data() - gets rea->data This way it is much simpler to keep API/ABI compatibility in the future.
2009-02-28Simplify async_connect_send slightlyVolker Lendecke1-9/+6
2009-02-25Remove async_req based async_sendVolker Lendecke1-232/+0
2009-02-25Remove async_req based async_recvVolker Lendecke1-68/+0
2009-02-24Add more conventional async_recvVolker Lendecke1-0/+67
2009-02-24Add more conventional async_sendVolker Lendecke1-0/+67
2009-02-24Remove unused param_connect structVolker Lendecke1-11/+0
2009-02-24Remove unused recvallVolker Lendecke1-110/+0
2009-02-24Add async read_packetVolker Lendecke1-0/+118
2009-02-24Fix async writevVolker Lendecke1-1/+1
2009-02-24Remove async sendallVolker Lendecke1-111/+0
2009-02-24Add async writevVolker Lendecke1-0/+105
2009-02-24Convert async_connect to tevent_reqVolker Lendecke1-27/+27
2009-02-09s3 async: Fix the build on systems that have ETIMEDOUT but not ETIMETim Prouty1-2/+2
Fallback on EAGAIN
2009-02-09async_sock: Map ASYNC_REQ_TIMEOUT to ETIMEDOUT instead of ETIMEKai Blin1-1/+5
Also, fall back to EIO if ETIMEDOUT is not present
2009-02-09async_sock: Use unix errnos instead of NTSTATUSKai Blin1-27/+93
This also switches wb_reqtrans to use wbcErr instead of NTSTATUS as it would be pointless to convert to errno first and to wbcErr later.
2009-02-01Split up async_req into a generic and a NTSTATUS specific partVolker Lendecke1-15/+15
2009-01-28async_sock: Move to top levelKai Blin1-0/+703