TODO doesn't work for cli_trans s3:libsmb: if we have to abort a read_smb requests...
authorStefan Metzmacher <metze@samba.org>
Mon, 19 Sep 2011 23:11:04 +0000 (01:11 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 16 Jan 2018 06:43:40 +0000 (07:43 +0100)
metze

libcli/smb/smbXcli_base.c

index e9fdc1dc32a83e2efae12b3df393b28a8079817d..965264316593d61e219d6df3f6879a4948f07d57 100644 (file)
@@ -976,6 +976,14 @@ void smbXcli_req_unset_pending(struct tevent_req *req)
                 */
                /* TODO: smbXcli_conn_cancel_read_req */
                TALLOC_FREE(conn->pending);
+               if (cli->conn.read_smb_req != NULL) {
+                       /*
+                        * If we abort a read request,
+                        * we might have already read a half pdu,
+                        * the only thing we can do now is to disconnect.
+                        */
+                       cli_state_disconnect(cli);
+               }
                conn->read_smb_req = NULL;
 
                if (!NT_STATUS_IS_OK(cancel_status)) {