From: Andrew Tridgell Date: Sat, 28 Apr 2007 16:55:37 +0000 (+0200) Subject: removed unnecessary variable X-Git-Tag: tevent-0.9.20~348^2~2812 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1627a5d7496618128bb01116ff661a2d95c9afe6;p=thirdparty%2Fsamba.git removed unnecessary variable (This used to be ctdb commit ef0027faa631b00c7fc1a7c4538fbf3080248f0b) --- diff --git a/ctdb/common/ctdb_call.c b/ctdb/common/ctdb_call.c index a7fb253a377..012e6758a53 100644 --- a/ctdb/common/ctdb_call.c +++ b/ctdb/common/ctdb_call.c @@ -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; diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h index 170e28d3621..52a7d66f05f 100644 --- a/ctdb/include/ctdb_private.h +++ b/ctdb/include/ctdb_private.h @@ -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;