ctdb-daemon: Rename struct ctdb_client_notify_register to ctdb_notify_data_old
authorAmitay Isaacs <amitay@gmail.com>
Wed, 28 Oct 2015 06:43:20 +0000 (17:43 +1100)
committerMartin Schwenke <martins@samba.org>
Tue, 3 Nov 2015 23:47:15 +0000 (00:47 +0100)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/include/ctdb_protocol.h
ctdb/server/ctdb_daemon.c
source3/lib/ctdbd_conn.c

index 52b39fb6026ce366b20a346f8826e5e8f2ef7bdf..030c114d6f1f0eddbf3bd1ee4e66c37acea29a1d 100644 (file)
@@ -759,7 +759,7 @@ struct ctdb_vnn_map_wire {
        uint32_t map[1];
 };
 
-struct ctdb_client_notify_register {
+struct ctdb_notify_data_old {
        uint64_t srvid;
        uint32_t len;
        uint8_t notify_data[1];
index a7439c34dd997ed466425142da226e316b2a5946..02607ffb5f0a6c0be34671209520573f76d3d080 100644 (file)
@@ -1671,19 +1671,19 @@ static int ctdb_client_notify_destructor(struct ctdb_client_notify_list *nl)
 
 int32_t ctdb_control_register_notify(struct ctdb_context *ctdb, uint32_t client_id, TDB_DATA indata)
 {
-       struct ctdb_client_notify_register *notify = (struct ctdb_client_notify_register *)indata.dptr;
+       struct ctdb_notify_data_old *notify = (struct ctdb_notify_data_old *)indata.dptr;
         struct ctdb_client *client = reqid_find(ctdb->idr, client_id, struct ctdb_client);
        struct ctdb_client_notify_list *nl;
 
        DEBUG(DEBUG_INFO,("Register srvid %llu for client %d\n", (unsigned long long)notify->srvid, client_id));
 
-       if (indata.dsize < offsetof(struct ctdb_client_notify_register, notify_data)) {
+       if (indata.dsize < offsetof(struct ctdb_notify_data_old, notify_data)) {
                DEBUG(DEBUG_ERR,(__location__ " Too little data in control : %d\n", (int)indata.dsize));
                return -1;
        }
 
-       if (indata.dsize != (notify->len + offsetof(struct ctdb_client_notify_register, notify_data))) {
-               DEBUG(DEBUG_ERR,(__location__ " Wrong amount of data in control. Got %d, expected %d\n", (int)indata.dsize, (int)(notify->len + offsetof(struct ctdb_client_notify_register, notify_data))));
+       if (indata.dsize != (notify->len + offsetof(struct ctdb_notify_data_old, notify_data))) {
+               DEBUG(DEBUG_ERR,(__location__ " Wrong amount of data in control. Got %d, expected %d\n", (int)indata.dsize, (int)(notify->len + offsetof(struct ctdb_notify_data_old, notify_data))));
                return -1;
        }
 
index 2ac8af3bc8a25260d77f319cb0bb490ed6ef80fe..e67a31d5bc6becce12a345abf3af56b89614b970 100644 (file)
@@ -1251,7 +1251,7 @@ int ctdbd_control_local(struct ctdbd_connection *conn, uint32_t opcode,
 
 int ctdb_watch_us(struct ctdbd_connection *conn)
 {
-       struct ctdb_client_notify_register reg_data;
+       struct ctdb_notify_data_old reg_data;
        size_t struct_len;
        int ret;
        int cstatus;
@@ -1260,7 +1260,7 @@ int ctdb_watch_us(struct ctdbd_connection *conn)
        reg_data.len = 1;
        reg_data.notify_data[0] = 0;
 
-       struct_len = offsetof(struct ctdb_client_notify_register,
+       struct_len = offsetof(struct ctdb_notify_data_old,
                              notify_data) + reg_data.len;
 
        ret = ctdbd_control_local(