Don't limit the number of retries in wb_trans.
authorVolker Lendecke <vl@samba.org>
Sun, 24 May 2009 11:22:26 +0000 (13:22 +0200)
committerVolker Lendecke <vl@samba.org>
Sun, 24 May 2009 11:51:07 +0000 (13:51 +0200)
This is better done with a tevent_req_set_endtime the caller should issue.

source3/lib/wbclient.c

index 41f5c81afe7e0ec50eedae7fe878155594ed9ebc..164cfc96911b45f9cfb329f06621edab1b984766 100644 (file)
@@ -468,7 +468,6 @@ struct wb_trans_state {
        struct tevent_context *ev;
        struct winbindd_request *wb_req;
        struct winbindd_response *wb_resp;
        struct tevent_context *ev;
        struct winbindd_request *wb_req;
        struct winbindd_response *wb_resp;
-       int num_retries;
        bool need_priv;
 };
 
        bool need_priv;
 };
 
@@ -516,7 +515,6 @@ struct tevent_req *wb_trans_send(TALLOC_CTX *mem_ctx,
        state->wb_ctx = wb_ctx;
        state->ev = ev;
        state->wb_req = wb_req;
        state->wb_ctx = wb_ctx;
        state->ev = ev;
        state->wb_req = wb_req;
-       state->num_retries = 10;
        state->need_priv = need_priv;
 
        if (!tevent_queue_add(wb_ctx->queue, ev, req, wb_trans_trigger,
        state->need_priv = need_priv;
 
        if (!tevent_queue_add(wb_ctx->queue, ev, req, wb_trans_trigger,
@@ -578,12 +576,6 @@ static bool wb_trans_retry(struct tevent_req *req,
                return true;
        }
 
                return true;
        }
 
-       state->num_retries -= 1;
-       if (state->num_retries == 0) {
-               tevent_req_error(req, wbc_err);
-               return true;
-       }
-
        /*
         * The transfer as such failed, retry after one second
         */
        /*
         * The transfer as such failed, retry after one second
         */