{
struct ctdb_reply_control *reply;
- reply = unpack_reply_control(ctdb, req, CTDB_CONTROL_GET_RECMASTER);
+ reply = unpack_reply_control(req, CTDB_CONTROL_GET_RECMASTER);
if (!reply) {
return false;
}
{
struct ctdb_reply_control *reply;
- reply = unpack_reply_control(ctdb, req, CTDB_CONTROL_GET_PNN);
+ reply = unpack_reply_control(req, CTDB_CONTROL_GET_PNN);
if (!reply) {
return false;
}
struct ctdb_reply_control *reply;
*nodemap = NULL;
- reply = unpack_reply_control(ctdb, req, CTDB_CONTROL_GET_NODEMAP);
+ reply = unpack_reply_control(req, CTDB_CONTROL_GET_NODEMAP);
if (!reply) {
return false;
}
struct ctdb_reply_control *reply;
*ips = NULL;
- reply = unpack_reply_control(ctdb, req, CTDB_CONTROL_GET_PUBLIC_IPS);
+ reply = unpack_reply_control(req, CTDB_CONTROL_GET_PUBLIC_IPS);
if (!reply) {
return false;
}
}
/* Sanity-checking wrapper for reply. */
-struct ctdb_reply_control *unpack_reply_control(struct ctdb_connection *ctdb,
- struct ctdb_request *req,
+struct ctdb_reply_control *unpack_reply_control(struct ctdb_request *req,
enum ctdb_controls control)
{
size_t len;
/* Library user error if this isn't a reply to a call. */
if (len < sizeof(*inhdr)) {
errno = EINVAL;
- DEBUG(ctdb, LOG_ALERT,
+ DEBUG(req->ctdb, LOG_ALERT,
"Short ctdbd control reply: %zu bytes", len);
return NULL;
}
if (req->hdr.hdr->operation != CTDB_REQ_CONTROL) {
errno = EINVAL;
- DEBUG(ctdb, LOG_ALERT,
+ DEBUG(req->ctdb, LOG_ALERT,
"This was not a ctdbd control request: operation %u",
req->hdr.hdr->operation);
return NULL;
/* ... or if it was a different control from what we expected. */
if (req->hdr.control->opcode != control) {
errno = EINVAL;
- DEBUG(ctdb, LOG_ALERT,
+ DEBUG(req->ctdb, LOG_ALERT,
"This was not an opcode %u ctdbd control request: %u",
control, req->hdr.control->opcode);
return NULL;
/* ctdbd or our error if this isn't a reply call. */
if (inhdr->hdr.operation != CTDB_REPLY_CONTROL) {
errno = EIO;
- DEBUG(ctdb, LOG_CRIT,
+ DEBUG(req->ctdb, LOG_CRIT,
"Invalid ctdbd control reply: operation %u",
inhdr->hdr.operation);
return NULL;
control = CTDB_CONTROL_DB_ATTACH_PERSISTENT;
}
- reply = unpack_reply_control(ctdb, req, control);
+ reply = unpack_reply_control(req, control);
if (!reply || reply->status != 0) {
if (reply) {
DEBUG(ctdb, LOG_ERR,
return NULL;
}
- reply = unpack_reply_control(ctdb, dbpath_req, CTDB_CONTROL_GETDBPATH);
+ reply = unpack_reply_control(dbpath_req, CTDB_CONTROL_GETDBPATH);
if (!reply) {
return NULL;
}
ctdb_callback_t, void *);
uint32_t new_reqid(struct ctdb_connection *ctdb);
-struct ctdb_reply_control *unpack_reply_control(struct ctdb_connection *ctdb,
- struct ctdb_request *req,
+struct ctdb_reply_control *unpack_reply_control(struct ctdb_request *req,
enum ctdb_controls control);
void ctdb_cancel_callback(struct ctdb_connection *ctdb,
struct ctdb_request *req,
struct message_handler_info *info = req->extra;
struct ctdb_reply_control *reply;
- reply = unpack_reply_control(ctdb, req, CTDB_CONTROL_REGISTER_SRVID);
+ reply = unpack_reply_control(req, CTDB_CONTROL_REGISTER_SRVID);
if (!reply) {
return false;
}
struct message_handler_info *handler = req->extra;
struct ctdb_reply_control *reply;
- reply = unpack_reply_control(ctdb, req, CTDB_CONTROL_DEREGISTER_SRVID);
+ reply = unpack_reply_control(req, CTDB_CONTROL_DEREGISTER_SRVID);
if (!reply) {
return false;
}