Rev 51: fix a bug in new structure handling in http://samba.org/~tridge/ctdb

tridge at samba.org tridge at samba.org
Mon Jan 29 11:11:17 GMT 2007


------------------------------------------------------------
revno: 51
revision-id: tridge at samba.org-20070129111116-ykmnhtzqda13o5ou
parent: tridge at samba.org-20070125051317-0ar5t90i0d1nd3lq
committer: Andrew Tridgell <tridge at samba.org>
branch nick: tridge
timestamp: Mon 2007-01-29 22:11:16 +1100
message:
  fix a bug in new structure handling
modified:
  common/ctdb_call.c             ctdb_call.c-20061128065342-to93h6eejj5kon81-1
=== modified file 'common/ctdb_call.c'
--- a/common/ctdb_call.c	2007-01-25 05:13:17 +0000
+++ b/common/ctdb_call.c	2007-01-29 11:11:16 +0000
@@ -299,6 +299,7 @@
 	/* determine if we are the dmaster for this key. This also
 	   fetches the record data (if any), thus avoiding a 2nd fetch of the data 
 	   if the call will be answered locally */
+
 	ret = ctdb_ltdb_fetch(ctdb, call.key, &header, &data);
 	if (ret != 0) {
 		ctdb_send_error(ctdb, hdr, ret, "ltdb fetch failed in ctdb_request_call");
@@ -505,8 +506,10 @@
 
 	state->state = CTDB_CALL_DONE;
 	state->node = ctdb->nodes[ctdb->vnn];
-
-	ret = ctdb_call_local(ctdb, call, header, data, ctdb->vnn);
+	state->call = *call;
+
+	ret = ctdb_call_local(ctdb, &state->call, header, data, ctdb->vnn);
+
 	return state;
 }
 
@@ -557,11 +560,9 @@
 	memcpy(&state->c->data[0], call->key.dptr, call->key.dsize);
 	memcpy(&state->c->data[call->key.dsize], 
 	       call->call_data.dptr, call->call_data.dsize);
+	state->call                = *call;
 	state->call.call_data.dptr = &state->c->data[call->key.dsize];
-	state->call.call_data.dsize = call->call_data.dsize;
-
-	state->call.key.dptr         = &state->c->data[0];
-	state->call.key.dsize        = call->key.dsize;
+	state->call.key.dptr       = &state->c->data[0];
 
 	state->node   = ctdb->nodes[header.dmaster];
 	state->state  = CTDB_CALL_WAIT;



More information about the samba-cvs mailing list