r4886: fixed two places where we process the send side of a socket after the
authorAndrew Tridgell <tridge@samba.org>
Fri, 21 Jan 2005 06:55:33 +0000 (06:55 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:09:02 +0000 (13:09 -0500)
recv side in the same event. That's a bad idea, as the first callback
could decide to destroy the socket.
(This used to be commit bf74ea34fc0e3c31e220c8f5a9217c95f3ca1d52)

source4/libcli/raw/clitransport.c
source4/librpc/rpc/dcerpc_sock.c

index eb9d2dde782ff742f9f6ce9a5a724ea6c5e8bf15..e6d40639c62715295fafe5091efd4b33e5d3f1b9 100644 (file)
@@ -40,6 +40,7 @@ static void smbcli_transport_event_handler(struct event_context *ev, struct fd_e
 
        if (flags & EVENT_FD_READ) {
                smbcli_transport_process_recv(transport);
+               return;
        }
        if (flags & EVENT_FD_WRITE) {
                smbcli_transport_process_send(transport);
index b48fedb0d816ef251702c7b845a223f9322fdaea..720055087b58fda0dae100b700a3fd1a187809bb 100644 (file)
@@ -199,6 +199,7 @@ static void sock_io_handler(struct event_context *ev, struct fd_event *fde,
 
        if (flags & EVENT_FD_WRITE) {
                sock_process_send(p);
+               return;
        }
 
        if (sock->sock == NULL) {