diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-08-11 12:28:06 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-08-12 11:08:00 +0200 |
commit | 02cb2052d8c68a3ba6dc8a19f580f25039321a75 (patch) | |
tree | 5c51e8a2249a3886a73638e793dbc20f6d07bec7 /source3/libsmb | |
parent | 56d3c91af70809fbdd86de888ac983a41e070ca3 (diff) | |
download | samba-02cb2052d8c68a3ba6dc8a19f580f25039321a75.tar.gz samba-02cb2052d8c68a3ba6dc8a19f580f25039321a75.tar.bz2 samba-02cb2052d8c68a3ba6dc8a19f580f25039321a75.zip |
s3:libsmb: make use of cli_state_receive_next() in cli_smb_received()
metze
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/async_smb.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/source3/libsmb/async_smb.c b/source3/libsmb/async_smb.c index 2744f8135a..2c053421dd 100644 --- a/source3/libsmb/async_smb.c +++ b/source3/libsmb/async_smb.c @@ -719,23 +719,8 @@ static void cli_smb_received(struct tevent_req *subreq) done: TALLOC_FREE(frame); - if ((talloc_array_length(cli->conn.pending) > 0) && - (cli->conn.read_smb_req == NULL)) { - /* - * Set up another read request for the other pending cli_smb - * requests - */ - state = tevent_req_data(cli->conn.pending[0], - struct cli_smb_state); - cli->conn.read_smb_req = read_smb_send( - cli->conn.pending, state->ev, cli->conn.fd); - if (cli->conn.read_smb_req == NULL) { - status = NT_STATUS_NO_MEMORY; - cli_state_notify_pending(cli, status); - return; - } - tevent_req_set_callback(cli->conn.read_smb_req, - cli_smb_received, cli); + if (!cli_state_receive_next(cli)) { + cli_state_notify_pending(cli, NT_STATUS_NO_MEMORY); } } |