From 84d276a5bec83ee0a0a95622a396048c73f0efa8 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 17 Apr 2007 23:03:30 +0200 Subject: Some more debug and two memleak fixes (This used to be ctdb commit 1e2802422794956827263265306952df5e69b377) --- ctdb/common/ctdb_client.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'ctdb/common/ctdb_client.c') diff --git a/ctdb/common/ctdb_client.c b/ctdb/common/ctdb_client.c index 1b5c80c6f4..d14647ba90 100644 --- a/ctdb/common/ctdb_client.c +++ b/ctdb/common/ctdb_client.c @@ -75,10 +75,15 @@ void ctdb_reply_fetch_lock(struct ctdb_context *ctdb, struct ctdb_req_header *hd struct ctdb_fetch_lock_state *state; state = idr_find(ctdb->idr, hdr->reqid); - if (state == NULL) return; + if (state == NULL) { + DEBUG(0, ("reqid %d not found at %s\n", hdr->reqid, + __location__)); + return; + } if (!talloc_get_type(state, struct ctdb_fetch_lock_state)) { - DEBUG(0, ("ctdb idr type error at %s\n", __location__)); + DEBUG(0, ("ctdb idr type error at %s, it's a %s\n", + __location__, talloc_get_name(state))); return; } @@ -575,7 +580,7 @@ struct ctdb_record_handle *ctdb_fetch_lock(struct ctdb_db_context *ctdb_db, TALL talloc_set_destructor(h, fetch_lock_destructor); - ret = ctdb_ltdb_fetch(ctdb_db, key, &h->header, ctdb_db, data); + ret = ctdb_ltdb_fetch(ctdb_db, key, &h->header, h, data); if (ret != 0) { talloc_free(h); return NULL; -- cgit