diff options
author | Stefan Metzmacher <metze@samba.org> | 2005-11-11 07:38:25 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:46:10 -0500 |
commit | 3015c6ba0435c9e99c202890e50187db891d761d (patch) | |
tree | a1e0551df2f0fcd51ac801f9d2aad17b0c3c1c9f /source4/libcli/raw/clitransport.c | |
parent | 7a78d2d6b083fbd408c766116693d01b57628f28 (diff) | |
download | samba-3015c6ba0435c9e99c202890e50187db891d761d.tar.gz samba-3015c6ba0435c9e99c202890e50187db891d761d.tar.bz2 samba-3015c6ba0435c9e99c202890e50187db891d761d.zip |
r11669: - make sure req is initialized
- call async callback on error
metze
(This used to be commit 43aa5cffd3fd8bf07b236a039f5146e1e44296c6)
Diffstat (limited to 'source4/libcli/raw/clitransport.c')
-rw-r--r-- | source4/libcli/raw/clitransport.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/libcli/raw/clitransport.c b/source4/libcli/raw/clitransport.c index 2aebb92790..fba6c36bbe 100644 --- a/source4/libcli/raw/clitransport.c +++ b/source4/libcli/raw/clitransport.c @@ -347,7 +347,7 @@ static NTSTATUS smbcli_transport_finish_recv(void *private, DATA_BLOB blob) uint8_t *buffer, *hdr, *vwv; int len; uint16_t wct=0, mid = 0, op = 0; - struct smbcli_request *req; + struct smbcli_request *req = NULL; buffer = blob.data; len = blob.length; @@ -482,6 +482,9 @@ error: if (req) { DLIST_REMOVE(transport->pending_recv, req); req->state = SMBCLI_REQUEST_ERROR; + if (req->async.fn) { + req->async.fn(req); + } } else { talloc_free(buffer); } |