s3:smb2cli_base: make use of map_nt_error_from_unix_common()
authorStefan Metzmacher <metze@samba.org>
Tue, 25 Oct 2011 12:56:38 +0000 (14:56 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 25 Oct 2011 15:58:33 +0000 (17:58 +0200)
metze

source3/libsmb/smb2cli_base.c

index 3563af12ef364fff95510d29a8003b09eabd4b50..f5d3de0ac761b0f26180e9045f8ed49adbed8eaf 100644 (file)
@@ -388,7 +388,8 @@ static void smb2cli_writev_done(struct tevent_req *subreq)
        TALLOC_FREE(subreq);
        if (nwritten == -1) {
                /* here, we need to notify all pending requests */
-               smb2cli_notify_pending(state->cli, map_nt_error_from_unix(err));
+               NTSTATUS status = map_nt_error_from_unix_common(err);
+               smb2cli_notify_pending(state->cli, status);
                return;
        }
 }
@@ -536,7 +537,8 @@ static void smb2cli_inbuf_received(struct tevent_req *subreq)
                 * We need to close the connection and notify
                 * all pending requests.
                 */
-               smb2cli_notify_pending(cli, map_nt_error_from_unix(err));
+               status = map_nt_error_from_unix_common(err);
+               smb2cli_notify_pending(cli, status);
                TALLOC_FREE(frame);
                return;
        }