diff --git a/ctdb/client/ctdb_client.c b/ctdb/client/ctdb_client.c index 684bb177880..14cc5a5523f 100644 --- a/ctdb/client/ctdb_client.c +++ b/ctdb/client/ctdb_client.c @@ -990,7 +990,7 @@ static void invoke_control_callback(struct tevent_context *ev, 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); diff --git a/ctdb/include/ctdb_protocol.h b/ctdb/include/ctdb_protocol.h index e833c2083e0..e493d1c935f 100644 --- a/ctdb/include/ctdb_protocol.h +++ b/ctdb/include/ctdb_protocol.h @@ -493,7 +493,7 @@ struct ctdb_req_control_old { uint8_t data[1]; }; -struct ctdb_reply_control { +struct ctdb_reply_control_old { struct ctdb_req_header hdr; int32_t status; uint32_t datalen; diff --git a/ctdb/server/ctdb_control.c b/ctdb/server/ctdb_control.c index 99caba7995c..b86e02e326f 100644 --- a/ctdb/server/ctdb_control.c +++ b/ctdb/server/ctdb_control.c @@ -727,7 +727,7 @@ static int32_t ctdb_control_dispatch(struct ctdb_context *ctdb, 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 */ @@ -735,11 +735,11 @@ void ctdb_request_control_reply(struct ctdb_context *ctdb, struct ctdb_req_contr 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; @@ -791,7 +791,7 @@ void ctdb_request_control(struct ctdb_context *ctdb, struct ctdb_req_header *hdr */ 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; diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c index b95741c1479..f80289f4875 100644 --- a/ctdb/server/ctdb_daemon.c +++ b/ctdb/server/ctdb_daemon.c @@ -1440,17 +1440,17 @@ static void daemon_control_callback(struct ctdb_context *ctdb, 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; diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c index b9ca94779bd..3ddbf41e9a5 100644 --- a/source3/lib/ctdbd_conn.c +++ b/source3/lib/ctdbd_conn.c @@ -642,7 +642,7 @@ static int ctdbd_control(struct ctdbd_connection *conn, { 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; @@ -691,7 +691,7 @@ static int ctdbd_control(struct ctdbd_connection *conn, 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( @@ -794,7 +794,7 @@ bool ctdb_processes_exist(struct ctdbd_connection *conn, 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; @@ -809,7 +809,7 @@ bool ctdb_processes_exist(struct ctdbd_connection *conn, 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;