return events;
}
-struct ctdb_request *new_ctdb_request(size_t len,
+struct ctdb_request *new_ctdb_request(struct ctdb_connection *ctdb, size_t len,
ctdb_callback_t cb, void *cbdata)
{
struct ctdb_request *req = malloc(sizeof(*req));
free(req);
return NULL;
}
+ req->ctdb = ctdb;
req->hdr.hdr = io_elem_data(req->io, NULL);
req->reply = NULL;
req->callback = cb;
struct ctdb_request *req;
struct ctdb_req_control *pkt;
- req = new_ctdb_request(offsetof(struct ctdb_req_control, data) + extra, callback, cbdata);
+ req = new_ctdb_request(
+ ctdb, offsetof(struct ctdb_req_control, data) + extra,
+ callback, cbdata);
if (!req)
return NULL;
}
/* Slow path: create request. */
- req = new_ctdb_request(offsetof(struct ctdb_req_call, data)
- + key.dsize, readrecordlock_retry, cbdata);
+ req = new_ctdb_request(
+ ctdb_db->ctdb,
+ offsetof(struct ctdb_req_call, data) + key.dsize,
+ readrecordlock_retry, cbdata);
if (!req) {
DEBUG(ctdb_db->ctdb, LOG_ERR,
"ctdb_readrecordlock_async: allocation failed");