mirror of
https://github.com/samba-team/samba.git
synced 2025-09-18 09:44:19 +03:00
ctdb-daemon: Rename struct ctdb_client_notify_register to ctdb_notify_data_old
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
committed by
Martin Schwenke
parent
6e37bb7c3a
commit
b936145951
@@ -759,7 +759,7 @@ struct ctdb_vnn_map_wire {
|
|||||||
uint32_t map[1];
|
uint32_t map[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ctdb_client_notify_register {
|
struct ctdb_notify_data_old {
|
||||||
uint64_t srvid;
|
uint64_t srvid;
|
||||||
uint32_t len;
|
uint32_t len;
|
||||||
uint8_t notify_data[1];
|
uint8_t notify_data[1];
|
||||||
|
@@ -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)
|
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 *client = reqid_find(ctdb->idr, client_id, struct ctdb_client);
|
||||||
struct ctdb_client_notify_list *nl;
|
struct ctdb_client_notify_list *nl;
|
||||||
|
|
||||||
DEBUG(DEBUG_INFO,("Register srvid %llu for client %d\n", (unsigned long long)notify->srvid, client_id));
|
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));
|
DEBUG(DEBUG_ERR,(__location__ " Too little data in control : %d\n", (int)indata.dsize));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (indata.dsize != (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_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_notify_data_old, notify_data))));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1251,7 +1251,7 @@ int ctdbd_control_local(struct ctdbd_connection *conn, uint32_t opcode,
|
|||||||
|
|
||||||
int ctdb_watch_us(struct ctdbd_connection *conn)
|
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;
|
size_t struct_len;
|
||||||
int ret;
|
int ret;
|
||||||
int cstatus;
|
int cstatus;
|
||||||
@@ -1260,7 +1260,7 @@ int ctdb_watch_us(struct ctdbd_connection *conn)
|
|||||||
reg_data.len = 1;
|
reg_data.len = 1;
|
||||||
reg_data.notify_data[0] = 0;
|
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;
|
notify_data) + reg_data.len;
|
||||||
|
|
||||||
ret = ctdbd_control_local(
|
ret = ctdbd_control_local(
|
||||||
|
Reference in New Issue
Block a user