1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

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 <rusty@rustcorp.com.au>

(This used to be ctdb commit 8626b6d7d4e5c747b6bac9d5e5b2cd302b6e144c)
This commit is contained in:
Rusty Russell 2010-06-04 13:34:06 +09:30
parent c05f3ee99b
commit 5d0d51e77b

View File

@ -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;