Rev 219: removed unnecessary variable in
http://samba.org/~tridge/ctdb
tridge at samba.org
tridge at samba.org
Sat Apr 28 16:55:38 GMT 2007
------------------------------------------------------------
revno: 219
revision-id: tridge at samba.org-20070428165537-dq8tirclx8okd1ec
parent: tridge at samba.org-20070428161833-g1jbj1dibtxk28ih
committer: Andrew Tridgell <tridge at samba.org>
branch nick: tridge
timestamp: Sat 2007-04-28 18:55:37 +0200
message:
removed unnecessary variable
modified:
common/ctdb_call.c ctdb_call.c-20061128065342-to93h6eejj5kon81-1
include/ctdb_private.h ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13
=== modified file 'common/ctdb_call.c'
--- a/common/ctdb_call.c 2007-04-28 16:18:33 +0000
+++ b/common/ctdb_call.c 2007-04-28 16:55:37 +0000
@@ -434,8 +434,8 @@
/* if we are not the dmaster, then send a redirect to the
requesting node */
if (header.dmaster != ctdb->vnn) {
+ talloc_free(data.dptr);
ctdb_call_send_redirect(ctdb, call.key, c, &header);
- talloc_free(data.dptr);
ctdb_ltdb_unlock(ctdb_db, call.key);
return;
}
@@ -595,7 +595,7 @@
*/
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 @@
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 @@
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 @@
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 @@
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;
=== modified file 'include/ctdb_private.h'
--- a/include/ctdb_private.h 2007-04-28 16:18:33 +0000
+++ b/include/ctdb_private.h 2007-04-28 16:55:37 +0000
@@ -263,7 +263,6 @@
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;
More information about the samba-cvs
mailing list