From 8626b6d7d4e5c747b6bac9d5e5b2cd302b6e144c Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Fri, 4 Jun 2010 13:34:06 +0930 Subject: [PATCH] libctdb: fix wrong argument being handed to callback on attachdb fail When attachdb failed, we were handing the db, not the user-supplied arg to the callback. Signed-off-by: Rusty Russell --- libctdb/ctdb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libctdb/ctdb.c b/libctdb/ctdb.c index 8700a60d..43c2829c 100644 --- a/libctdb/ctdb.c +++ b/libctdb/ctdb.c @@ -449,7 +449,7 @@ static void attachdb_done(struct ctdb_connection *ctdb, if (!reply || reply->status != 0) { /* We failed. Hand request to user and have them discover it * via ctdb_attachdb_recv. */ - db->callback(ctdb, req, db); + db->callback(ctdb, req, db->private_data); return; } db->id = *(uint32_t *)reply->data; @@ -460,7 +460,7 @@ static void attachdb_done(struct ctdb_connection *ctdb, &db->id, sizeof(db->id), attachdb_getdbpath_done, db); if (!req2) { - db->callback(ctdb, req, db); + db->callback(ctdb, req, db->private_data); return; } req->extra = req2; -- 2.34.1