r11609: fixed handling of one way requests with new send code
authorAndrew Tridgell <tridge@samba.org>
Wed, 9 Nov 2005 14:00:31 +0000 (14:00 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:45:58 +0000 (13:45 -0500)
source/libcli/raw/clitransport.c

index aafdfca74c4c60485e3503bad8041a9b3e4ad9f4..bc00b19ef580dcdb57ff769f396f1a2bcd41d1bf 100644 (file)
@@ -571,11 +571,12 @@ void smbcli_transport_send(struct smbcli_request *req)
        if (req->one_way_request) {
                req->state = SMBCLI_REQUEST_DONE;
                smbcli_request_destroy(req);
-       } else {
-               req->state = SMBCLI_REQUEST_RECV;
-               DLIST_ADD(req->transport->pending_recv, req);
+               return;
        }
 
+       req->state = SMBCLI_REQUEST_RECV;
+       DLIST_ADD(req->transport->pending_recv, req);
+
        /* add a timeout */
        if (req->transport->options.request_timeout) {
                event_add_timed(req->transport->socket->event.ctx, req,