From 5d0d51e77b303af132e6f9f1f898f3f11f76c69a 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 (This used to be ctdb commit 8626b6d7d4e5c747b6bac9d5e5b2cd302b6e144c) --- ctdb/libctdb/ctdb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ctdb/libctdb/ctdb.c b/ctdb/libctdb/ctdb.c index 8700a60dd4d..43c2829c572 100644 --- a/ctdb/libctdb/ctdb.c +++ b/ctdb/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;