Rev 638: fixed a valgrind error,
and some warnings in http://samba.org/~tridge/ctdb
tridge at samba.org
tridge at samba.org
Sun Sep 23 23:57:15 GMT 2007
------------------------------------------------------------
revno: 638
revision-id: tridge at samba.org-20070923235714-iyd0qvkomu6nvrjq
parent: tridge at samba.org-20070921061204-iccorokd8051qk7t
committer: Andrew Tridgell <tridge at samba.org>
branch nick: tridge
timestamp: Mon 2007-09-24 09:57:14 +1000
message:
fixed a valgrind error, and some warnings
modified:
server/ctdb_persistent.c ctdb_persistent.c-20070920053845-u2ggm5relkdor3xg-1
=== modified file 'server/ctdb_persistent.c'
--- a/server/ctdb_persistent.c 2007-09-21 05:44:13 +0000
+++ b/server/ctdb_persistent.c 2007-09-23 23:57:14 +0000
@@ -88,7 +88,7 @@
CTDB_NO_MEMORY(ctdb, state);
state->ctdb = ctdb;
- state->c = talloc_steal(state, c);
+ state->c = c;
for (i=0;i<ctdb->vnn_map->size;i++) {
struct ctdb_node *node = ctdb->nodes[ctdb->vnn_map->map[i]];
@@ -124,7 +124,10 @@
/* we need to wait for the replies */
*async_reply = true;
- /* but we wont wait forever */
+ /* need to keep the control structure around */
+ talloc_steal(state, c);
+
+ /* but we won't wait forever */
event_add_timed(ctdb->ev, state,
timeval_current_ofs(ctdb->tunable.control_timeout, 0),
ctdb_persistent_store_timeout, state);
@@ -161,7 +164,8 @@
if (oldheader.rsn >= state->header->rsn) {
DEBUG(0,("existing header for db_id 0x%08x has larger RSN %llu than new RSN %llu in ctdb_persistent_store\n",
- state->ctdb_db->db_id, oldheader.rsn, state->header->rsn));
+ state->ctdb_db->db_id,
+ (unsigned long long)oldheader.rsn, (unsigned long long)state->header->rsn));
return -1;
}
@@ -249,7 +253,8 @@
state->data.dsize = rec->datalen;
if (state->data.dsize < sizeof(struct ctdb_ltdb_header)) {
- DEBUG(0,("Invalid data size %u in ctdb_control_update_record\n", state->data.dsize));
+ DEBUG(0,("Invalid data size %u in ctdb_control_update_record\n",
+ (unsigned)state->data.dsize));
return -1;
}
More information about the samba-cvs
mailing list