]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
removed unnecessary variable
authorAndrew Tridgell <tridge@samba.org>
Sat, 28 Apr 2007 16:55:37 +0000 (18:55 +0200)
committerAndrew Tridgell <tridge@samba.org>
Sat, 28 Apr 2007 16:55:37 +0000 (18:55 +0200)
(This used to be ctdb commit ef0027faa631b00c7fc1a7c4538fbf3080248f0b)

ctdb/common/ctdb_call.c
ctdb/include/ctdb_private.h

index a7fb253a377ee248914dcbcf8450688e87440fe1..012e6758a53bd12a3f020457d84b798a9774b6b6 100644 (file)
@@ -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;
index 170e28d3621944fb865574cfd4a9341abc29ddb4..52a7d66f05fbcecfdd314fee908fe1057df264ba 100644 (file)
@@ -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;