mirror of
https://github.com/samba-team/samba.git
synced 2025-03-20 22:50:26 +03:00
removed unnecessary variable
(This used to be ctdb commit ef0027faa631b00c7fc1a7c4538fbf3080248f0b)
This commit is contained in:
parent
6e09bfdaf9
commit
1627a5d749
@ -434,8 +434,8 @@ void ctdb_request_call(struct ctdb_context *ctdb, struct ctdb_req_header *hdr)
|
||||
/* if we are not the dmaster, then send a redirect to the
|
||||
requesting node */
|
||||
if (header.dmaster != ctdb->vnn) {
|
||||
ctdb_call_send_redirect(ctdb, call.key, c, &header);
|
||||
talloc_free(data.dptr);
|
||||
ctdb_call_send_redirect(ctdb, call.key, c, &header);
|
||||
ctdb_ltdb_unlock(ctdb_db, call.key);
|
||||
return;
|
||||
}
|
||||
@ -595,7 +595,7 @@ void ctdb_reply_error(struct ctdb_context *ctdb, struct ctdb_req_header *hdr)
|
||||
*/
|
||||
static int ctdb_call_destructor(struct ctdb_call_state *state)
|
||||
{
|
||||
ctdb_reqid_remove(state->node->ctdb, state->reqid);
|
||||
ctdb_reqid_remove(state->ctdb_db->ctdb, state->reqid);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -609,7 +609,7 @@ void ctdb_call_timeout(struct event_context *ev, struct timed_event *te,
|
||||
struct ctdb_call_state *state = talloc_get_type(private_data, struct ctdb_call_state);
|
||||
DEBUG(0,(__location__ " call timeout for reqid %d\n", state->c->hdr.reqid));
|
||||
state->state = CTDB_CALL_ERROR;
|
||||
ctdb_set_error(state->node->ctdb, "ctdb_call %u timed out",
|
||||
ctdb_set_error(state->ctdb_db->ctdb, "ctdb_call %u timed out",
|
||||
state->c->hdr.reqid);
|
||||
if (state->async.fn) {
|
||||
state->async.fn(state);
|
||||
@ -650,7 +650,6 @@ struct ctdb_call_state *ctdb_call_local_send(struct ctdb_db_context *ctdb_db,
|
||||
talloc_steal(state, data->dptr);
|
||||
|
||||
state->state = CTDB_CALL_DONE;
|
||||
state->node = ctdb->nodes[ctdb->vnn];
|
||||
state->call = *call;
|
||||
state->ctdb_db = ctdb_db;
|
||||
|
||||
@ -711,7 +710,6 @@ struct ctdb_call_state *ctdb_daemon_call_send_remote(struct ctdb_db_context *ctd
|
||||
state->call.call_data.dptr = &state->c->data[call->key.dsize];
|
||||
state->call.key.dptr = &state->c->data[0];
|
||||
|
||||
state->node = ctdb->nodes[header->dmaster];
|
||||
state->state = CTDB_CALL_WAIT;
|
||||
state->header = *header;
|
||||
state->ctdb_db = ctdb_db;
|
||||
@ -734,16 +732,16 @@ struct ctdb_call_state *ctdb_daemon_call_send_remote(struct ctdb_db_context *ctd
|
||||
int ctdb_daemon_call_recv(struct ctdb_call_state *state, struct ctdb_call *call)
|
||||
{
|
||||
while (state->state < CTDB_CALL_DONE) {
|
||||
event_loop_once(state->node->ctdb->ev);
|
||||
event_loop_once(state->ctdb_db->ctdb->ev);
|
||||
}
|
||||
if (state->state != CTDB_CALL_DONE) {
|
||||
ctdb_set_error(state->node->ctdb, "%s", state->errmsg);
|
||||
ctdb_set_error(state->ctdb_db->ctdb, "%s", state->errmsg);
|
||||
talloc_free(state);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (state->call.reply_data.dsize) {
|
||||
call->reply_data.dptr = talloc_memdup(state->node->ctdb,
|
||||
call->reply_data.dptr = talloc_memdup(state->ctdb_db->ctdb,
|
||||
state->call.reply_data.dptr,
|
||||
state->call.reply_data.dsize);
|
||||
call->reply_data.dsize = state->call.reply_data.dsize;
|
||||
|
@ -263,7 +263,6 @@ struct ctdb_call_state {
|
||||
uint32_t reqid;
|
||||
struct ctdb_req_call *c;
|
||||
struct ctdb_db_context *ctdb_db;
|
||||
struct ctdb_node *node;
|
||||
const char *errmsg;
|
||||
struct ctdb_call call;
|
||||
struct ctdb_ltdb_header header;
|
||||
|
Loading…
x
Reference in New Issue
Block a user