ctdb-daemon: Rename struct ctdb_reply_call to ctdb_reply_call_old
authorAmitay Isaacs <amitay@gmail.com>
Thu, 29 Oct 2015 05:29:01 +0000 (16:29 +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_call.c
ctdb/server/ctdb_daemon.c
source3/lib/ctdbd_conn.c

index 79129412e13e799eb8a40a2a4f534acb2653a1aa..842d4ef75f82f10aa2c078972038db74df566dff 100644 (file)
@@ -164,7 +164,7 @@ static int ctdb_client_queue_pkt(struct ctdb_context *ctdb, struct ctdb_req_head
 */
 static void ctdb_client_reply_call(struct ctdb_context *ctdb, struct ctdb_req_header *hdr)
 {
-       struct ctdb_reply_call *c = (struct ctdb_reply_call *)hdr;
+       struct ctdb_reply_call_old *c = (struct ctdb_reply_call_old *)hdr;
        struct ctdb_client_call_state *state;
 
        state = reqid_find(ctdb->idr, hdr->reqid, struct ctdb_client_call_state);
index 3eee08d7b42c2f062153de0ea4f5a7078ef4310c..bff1d6789e0ddb35601fd538745612b52cdb73bf 100644 (file)
@@ -440,7 +440,7 @@ struct ctdb_req_call_old {
        uint8_t data[1]; /* key[] followed by calldata[] */
 };
 
-struct ctdb_reply_call {
+struct ctdb_reply_call_old {
        struct ctdb_req_header hdr;
        uint32_t status;
        uint32_t datalen;
index 278e0ddc3a4434d18bfc9140881f22c12bf024a8..62381b85fe550a7743111000eadf2fc843b6ff29 100644 (file)
@@ -889,7 +889,7 @@ void ctdb_request_call(struct ctdb_context *ctdb, struct ctdb_req_header *hdr)
 {
        struct ctdb_req_call_old *c = (struct ctdb_req_call_old *)hdr;
        TDB_DATA data;
-       struct ctdb_reply_call *r;
+       struct ctdb_reply_call_old *r;
        int ret, len;
        struct ctdb_ltdb_header header;
        struct ctdb_call *call;
@@ -1065,9 +1065,9 @@ void ctdb_request_call(struct ctdb_context *ctdb, struct ctdb_req_header *hdr)
                        DEBUG(DEBUG_ERR,(__location__ " ctdb_ltdb_unlock() failed with error %d\n", ret));
                }
 
-               len = offsetof(struct ctdb_reply_call, data) + data.dsize + sizeof(struct ctdb_ltdb_header);
+               len = offsetof(struct ctdb_reply_call_old, data) + data.dsize + sizeof(struct ctdb_ltdb_header);
                r = ctdb_transport_allocate(ctdb, ctdb, CTDB_REPLY_CALL, len, 
-                                           struct ctdb_reply_call);
+                                           struct ctdb_reply_call_old);
                CTDB_NO_MEMORY_FATAL(ctdb, r);
                r->hdr.destnode  = c->hdr.srcnode;
                r->hdr.reqid     = c->hdr.reqid;
@@ -1150,9 +1150,9 @@ void ctdb_request_call(struct ctdb_context *ctdb, struct ctdb_req_header *hdr)
                DEBUG(DEBUG_ERR,(__location__ " ctdb_ltdb_unlock() failed with error %d\n", ret));
        }
 
-       len = offsetof(struct ctdb_reply_call, data) + call->reply_data.dsize;
+       len = offsetof(struct ctdb_reply_call_old, data) + call->reply_data.dsize;
        r = ctdb_transport_allocate(ctdb, ctdb, CTDB_REPLY_CALL, len, 
-                                   struct ctdb_reply_call);
+                                   struct ctdb_reply_call_old);
        CTDB_NO_MEMORY_FATAL(ctdb, r);
        r->hdr.destnode  = hdr->srcnode;
        r->hdr.reqid     = hdr->reqid;
@@ -1177,7 +1177,7 @@ void ctdb_request_call(struct ctdb_context *ctdb, struct ctdb_req_header *hdr)
  */
 void ctdb_reply_call(struct ctdb_context *ctdb, struct ctdb_req_header *hdr)
 {
-       struct ctdb_reply_call *c = (struct ctdb_reply_call *)hdr;
+       struct ctdb_reply_call_old *c = (struct ctdb_reply_call_old *)hdr;
        struct ctdb_call_state *state;
 
        state = reqid_find(ctdb->idr, hdr->reqid, struct ctdb_call_state);
index 03266457235f73c8c9e257b73b8be3522b057640..81bb98d4d67c0986219ac18828b20f738484ed08 100644 (file)
@@ -318,7 +318,7 @@ static void daemon_call_from_client_callback(struct ctdb_call_state *state)
 {
        struct daemon_call_state *dstate = talloc_get_type(state->async.private_data, 
                                                           struct daemon_call_state);
-       struct ctdb_reply_call *r;
+       struct ctdb_reply_call_old *r;
        int res;
        uint32_t length;
        struct ctdb_client *client = dstate->client;
@@ -336,7 +336,7 @@ static void daemon_call_from_client_callback(struct ctdb_call_state *state)
                return;
        }
 
-       length = offsetof(struct ctdb_reply_call, data) + dstate->call->reply_data.dsize;
+       length = offsetof(struct ctdb_reply_call_old, data) + dstate->call->reply_data.dsize;
        /* If the client asked for readonly FETCH, we remapped this to 
           FETCH_WITH_HEADER when calling the daemon. So we must
           strip the extra header off the reply data before passing
@@ -348,7 +348,7 @@ static void daemon_call_from_client_callback(struct ctdb_call_state *state)
        }
 
        r = ctdbd_allocate_pkt(client->ctdb, dstate, CTDB_REPLY_CALL, 
-                              length, struct ctdb_reply_call);
+                              length, struct ctdb_reply_call_old);
        if (r == NULL) {
                DEBUG(DEBUG_ERR, (__location__ " Failed to allocate reply_call in ctdb daemon\n"));
                CTDB_DECREMENT_STAT(client->ctdb, pending_calls);
index 95179a854ec0e1de48bfea8e411e23c79d42716d..4ed1105d253f3d142ddc114dda4f9b4e21db9ea4 100644 (file)
@@ -978,7 +978,7 @@ int ctdbd_parse(struct ctdbd_connection *conn, uint32_t db_id,
 {
        struct ctdb_req_call_old req;
        struct ctdb_req_header *hdr = NULL;
-       struct ctdb_reply_call *reply;
+       struct ctdb_reply_call_old *reply;
        struct iovec iov[2];
        ssize_t nwritten;
        uint32_t flags;
@@ -1020,7 +1020,7 @@ int ctdbd_parse(struct ctdbd_connection *conn, uint32_t db_id,
                ret = EIO;
                goto fail;
        }
-       reply = (struct ctdb_reply_call *)hdr;
+       reply = (struct ctdb_reply_call_old *)hdr;
 
        if (reply->datalen == 0) {
                /*