libsmb: Use tevent_req_poll_ntstatus
authorVolker Lendecke <vl@samba.org>
Wed, 25 Feb 2015 20:42:33 +0000 (20:42 +0000)
committerJeremy Allison <jra@samba.org>
Thu, 26 Feb 2015 17:51:10 +0000 (18:51 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
libcli/smb/smb1cli_trans.c
libcli/smb/smbXcli_base.c

index 38d4e2e95f4bfc8b2e722f820f912a1065541f88..59888ba73cbba874968e40fbced93773d0540fe7 100644 (file)
@@ -894,8 +894,7 @@ NTSTATUS smb1cli_trans(TALLOC_CTX *mem_ctx, struct smbXcli_conn *conn,
                goto fail;
        }
 
-       if (!tevent_req_poll(req, ev)) {
-               status = map_nt_error_from_unix_common(errno);
+       if (!tevent_req_poll_ntstatus(req, ev, &status)) {
                goto fail;
        }
 
index 2b34980afcb3aa20560ed0df1320bb8c61e73c84..5773ab3d18c871fcf45ff9dc46aa0267e34b12d7 100644 (file)
@@ -590,9 +590,8 @@ NTSTATUS smbXcli_conn_samba_suicide(struct smbXcli_conn *conn,
        if (req == NULL) {
                goto fail;
        }
-       ok = tevent_req_poll(req, ev);
+       ok = tevent_req_poll_ntstatus(req, ev, &status);
        if (!ok) {
-               status = map_nt_error_from_unix_common(errno);
                goto fail;
        }
        status = smbXcli_conn_samba_suicide_recv(req);
@@ -4876,9 +4875,8 @@ NTSTATUS smbXcli_negprot(struct smbXcli_conn *conn,
        if (req == NULL) {
                goto fail;
        }
-       ok = tevent_req_poll(req, ev);
+       ok = tevent_req_poll_ntstatus(req, ev, &status);
        if (!ok) {
-               status = map_nt_error_from_unix_common(errno);
                goto fail;
        }
        status = smbXcli_negprot_recv(req);