------------------------------------------------------------ revno: 313 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell <[EMAIL PROTECTED]> branch nick: tridge timestamp: Thu 2007-05-17 14:10:38 +1000 message: removed the CTDB_CTRL_FLAG_NOREQUEUE flag modified: common/ctdb_client.c ctdb_client.c-20070411010216-3kd8v37k61steeya-1 common/ctdb_control.c ctdb_control.c-20070426122724-j6gkpiofhbwdin63-1 include/ctdb_private.h ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13 === modified file 'common/ctdb_client.c' --- a/common/ctdb_client.c 2007-05-17 02:07:29 +0000 +++ b/common/ctdb_client.c 2007-05-17 04:10:38 +0000 @@ -705,13 +705,6 @@ ctdb_socket_connect(ctdb); } - /* if the caller specified a timeout it makes no sense for the - daemon to requeue the packet if the destination is unavailable - */ - if (timeout) { - flags |= CTDB_CTRL_FLAG_NOREQUEUE; - } - state = talloc_zero(ctdb, struct ctdb_client_control_state); CTDB_NO_MEMORY(ctdb, state);
=== modified file 'common/ctdb_control.c' --- a/common/ctdb_control.c 2007-05-17 00:45:31 +0000 +++ b/common/ctdb_control.c 2007-05-17 04:10:38 +0000 @@ -32,6 +32,7 @@ uint32_t reqid; ctdb_control_callback_fn_t callback; void *private_data; + unsigned flags; }; /* @@ -362,19 +363,15 @@ struct timeval t, void *private_data) { struct ctdb_control_state *state = talloc_get_type(private_data, struct ctdb_control_state); - struct ctdb_req_control *c = (struct ctdb_req_control *)state->private_data; TALLOC_CTX *tmp_ctx = talloc_new(ev); state->ctdb->status.timeouts.control++; talloc_steal(tmp_ctx, state); - /* Dont retry the control if the caller asked for NOREQUEUE */ - if (!(c->flags & CTDB_CTRL_FLAG_NOREQUEUE)) { - state->callback(state->ctdb, -1, tdb_null, - "ctdb_control timed out", - state->private_data); - } + state->callback(state->ctdb, -1, tdb_null, + "ctdb_control timed out", + state->private_data); talloc_free(tmp_ctx); } @@ -407,6 +404,7 @@ state->callback = callback; state->private_data = private_data; state->ctdb = ctdb; + state->flags = flags; talloc_set_destructor(state, ctdb_control_destructor); === modified file 'include/ctdb_private.h' --- a/include/ctdb_private.h 2007-05-17 00:45:31 +0000 +++ b/include/ctdb_private.h 2007-05-17 04:10:38 +0000 @@ -295,8 +295,8 @@ re-issue the call */ #define CTDB_CALL_TIMEOUT 2 -/* timeout for ctdb control calls */ -#define CTDB_CONTROL_TIMEOUT 10 +/* maximum timeout for ctdb control calls */ +#define CTDB_CONTROL_TIMEOUT 60 /* timeout for ctdb traverse calls. When this is reached we cut short the traverse */ @@ -520,7 +520,6 @@ uint64_t srvid; uint32_t client_id; #define CTDB_CTRL_FLAG_NOREPLY 1 -#define CTDB_CTRL_FLAG_NOREQUEUE 2 uint32_t flags; uint32_t datalen; uint8_t data[1];