s3: Use any_nt_status_not_ok in winbind
[abartlet/samba.git/.git] / source3 / winbindd / winbindd_check_machine_acct.c
index 57595c18e08f321c6a55bcdd457f16a957faaf66..5f9cefa20920ea38d0347fbe8cbed1af50b78449 100644 (file)
@@ -61,8 +61,8 @@ struct tevent_req *winbindd_check_machine_acct_send(TALLOC_CTX *mem_ctx,
                return tevent_req_post(req, ev);
        }
 
-       subreq = rpccli_wbint_CheckMachineAccount_send(state, ev,
-                                                      domain->child.rpccli);
+       subreq = dcerpc_wbint_CheckMachineAccount_send(state, ev,
+                                                      domain->child.binding_handle);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
        }
@@ -78,15 +78,11 @@ static void winbindd_check_machine_acct_done(struct tevent_req *subreq)
                req, struct winbindd_check_machine_acct_state);
        NTSTATUS status, result;
 
-       status = rpccli_wbint_CheckMachineAccount_recv(subreq, state, &result);
-       if (!NT_STATUS_IS_OK(status)) {
+       status = dcerpc_wbint_CheckMachineAccount_recv(subreq, state, &result);
+       if (any_nt_status_not_ok(status, result, &status)) {
                tevent_req_nterror(req, status);
                return;
        }
-       if (!NT_STATUS_IS_OK(result)) {
-               tevent_req_nterror(req, result);
-               return;
-       }
        tevent_req_done(req);
 }