ctdb-daemon: Rename struct ctdb_reply_control to ctdb_reply_control_old
authorAmitay Isaacs <amitay@gmail.com>
Thu, 29 Oct 2015 05:44:08 +0000 (16:44 +1100)
committerMartin Schwenke <martins@samba.org>
Tue, 3 Nov 2015 23:47:14 +0000 (00:47 +0100)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/client/ctdb_client.c
ctdb/include/ctdb_protocol.h
ctdb/server/ctdb_control.c
ctdb/server/ctdb_daemon.c
source3/lib/ctdbd_conn.c

index 684bb17788051694eed8c0f93c84e8447f7ff62e..14cc5a5523f6729b458e2defc250046425bac86b 100644 (file)
@@ -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);
index e833c2083e08aad1dbb2e05276f6c35e0c8ba1ba..e493d1c935f6b327a9152f80bf355e925b2d0dd8 100644 (file)
@@ -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;
index 99caba7995c3d495938084f5dc8cf920a3945c08..b86e02e326f531c7e14094337332f9c0e481981d 100644 (file)
@@ -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;
index b95741c147974c24beb4d0281f4422a454bcc416..f80289f48756dd05c28dce1ff9689e1f18e23c3b 100644 (file)
@@ -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;
index b9ca94779bd105436e6bac2e8540fad2e1a42070..3ddbf41e9a55ba5a26468ab92d381688184205b7 100644 (file)
@@ -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;