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>
if (!reply || reply->status != 0) {
/* We failed. Hand request to user and have them discover it
* via ctdb_attachdb_recv. */
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;
return;
}
db->id = *(uint32_t *)reply->data;
&db->id, sizeof(db->id),
attachdb_getdbpath_done, db);
if (!req2) {
&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;
return;
}
req->extra = req2;