static void ctdb_client_reply_control(struct ctdb_context *ctdb,
struct ctdb_req_header *hdr)
{
- struct ctdb_reply_control *c = (struct ctdb_reply_control *)hdr;
+ struct ctdb_reply_control_old *c = (struct ctdb_reply_control_old *)hdr;
struct ctdb_client_control_state *state;
state = reqid_find(ctdb->idr, hdr->reqid, struct ctdb_client_control_state);
uint8_t data[1];
};
-struct ctdb_reply_control {
+struct ctdb_reply_control_old {
struct ctdb_req_header hdr;
int32_t status;
uint32_t datalen;
void ctdb_request_control_reply(struct ctdb_context *ctdb, struct ctdb_req_control_old *c,
TDB_DATA *outdata, int32_t status, const char *errormsg)
{
- struct ctdb_reply_control *r;
+ struct ctdb_reply_control_old *r;
size_t len;
/* some controls send no reply */
return;
}
- len = offsetof(struct ctdb_reply_control, data) + (outdata?outdata->dsize:0);
+ len = offsetof(struct ctdb_reply_control_old, data) + (outdata?outdata->dsize:0);
if (errormsg) {
len += strlen(errormsg);
}
- r = ctdb_transport_allocate(ctdb, ctdb, CTDB_REPLY_CONTROL, len, struct ctdb_reply_control);
+ r = ctdb_transport_allocate(ctdb, ctdb, CTDB_REPLY_CONTROL, len, struct ctdb_reply_control_old);
if (r == NULL) {
DEBUG(DEBUG_ERR,(__location__ "Unable to allocate transport - OOM or transport is down\n"));
return;
*/
void ctdb_reply_control(struct ctdb_context *ctdb, struct ctdb_req_header *hdr)
{
- struct ctdb_reply_control *c = (struct ctdb_reply_control *)hdr;
+ struct ctdb_reply_control_old *c = (struct ctdb_reply_control_old *)hdr;
TDB_DATA data;
struct ctdb_control_state *state;
const char *errormsg = NULL;
struct daemon_control_state *state = talloc_get_type(private_data,
struct daemon_control_state);
struct ctdb_client *client = state->client;
- struct ctdb_reply_control *r;
+ struct ctdb_reply_control_old *r;
size_t len;
int ret;
/* construct a message to send to the client containing the data */
- len = offsetof(struct ctdb_reply_control, data) + data.dsize;
+ len = offsetof(struct ctdb_reply_control_old, data) + data.dsize;
if (errormsg) {
len += strlen(errormsg);
}
r = ctdbd_allocate_pkt(ctdb, state, CTDB_REPLY_CONTROL, len,
- struct ctdb_reply_control);
+ struct ctdb_reply_control_old);
CTDB_NO_MEMORY_VOID(ctdb, r);
r->hdr.reqid = state->reqid;
{
struct ctdb_req_control_old req;
struct ctdb_req_header *hdr;
- struct ctdb_reply_control *reply = NULL;
+ struct ctdb_reply_control_old *reply = NULL;
struct iovec iov[2];
ssize_t nwritten;
int ret;
TALLOC_FREE(hdr);
return EIO;
}
- reply = (struct ctdb_reply_control *)hdr;
+ reply = (struct ctdb_reply_control_old *)hdr;
if (outdata) {
if (!(outdata->dptr = (uint8_t *)talloc_memdup(
while (num_received < num_pids) {
struct ctdb_req_header *hdr;
- struct ctdb_reply_control *reply;
+ struct ctdb_reply_control_old *reply;
uint32_t reqid;
int ret;
DEBUG(10, ("Received invalid reply\n"));
goto fail;
}
- reply = (struct ctdb_reply_control *)hdr;
+ reply = (struct ctdb_reply_control_old *)hdr;
reqid = reply->hdr.reqid;