1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

ctdb-daemon: Rename struct ctdb_control_get_ifaces to ctdb_iface_list_old

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
Amitay Isaacs 2015-10-28 19:43:48 +11:00 committed by Martin Schwenke
parent ecfaef5031
commit 44e611ddcf
8 changed files with 20 additions and 20 deletions

View File

@ -2877,12 +2877,12 @@ int ctdb_ctrl_get_public_ip_info(struct ctdb_context *ctdb,
int ctdb_ctrl_get_ifaces(struct ctdb_context *ctdb,
struct timeval timeout, uint32_t destnode,
TALLOC_CTX *mem_ctx,
struct ctdb_control_get_ifaces **_ifaces)
struct ctdb_iface_list_old **_ifaces)
{
int ret;
TDB_DATA outdata;
int32_t res;
struct ctdb_control_get_ifaces *ifaces;
struct ctdb_iface_list_old *ifaces;
uint32_t len;
uint32_t i;
@ -2896,7 +2896,7 @@ int ctdb_ctrl_get_ifaces(struct ctdb_context *ctdb,
return -1;
}
len = offsetof(struct ctdb_control_get_ifaces, ifaces);
len = offsetof(struct ctdb_iface_list_old, ifaces);
if (len > outdata.dsize) {
DEBUG(DEBUG_ERR,(__location__ " ctdb_control for get ifaces "
"returned invalid data with size %u > %u\n",
@ -2906,7 +2906,7 @@ int ctdb_ctrl_get_ifaces(struct ctdb_context *ctdb,
return -1;
}
ifaces = (struct ctdb_control_get_ifaces *)outdata.dptr;
ifaces = (struct ctdb_iface_list_old *)outdata.dptr;
len += ifaces->num*sizeof(struct ctdb_iface);
if (len > outdata.dsize) {
@ -2923,7 +2923,7 @@ int ctdb_ctrl_get_ifaces(struct ctdb_context *ctdb,
ifaces->ifaces[i].name[CTDB_IFACE_SIZE] = '\0';
}
*_ifaces = (struct ctdb_control_get_ifaces *)talloc_memdup(mem_ctx,
*_ifaces = (struct ctdb_iface_list_old *)talloc_memdup(mem_ctx,
outdata.dptr,
outdata.dsize);
talloc_free(outdata.dptr);

View File

@ -384,7 +384,7 @@ int ctdb_ctrl_get_public_ip_info(struct ctdb_context *ctdb,
int ctdb_ctrl_get_ifaces(struct ctdb_context *ctdb,
struct timeval timeout, uint32_t destnode,
TALLOC_CTX *mem_ctx,
struct ctdb_control_get_ifaces **ifaces);
struct ctdb_iface_list_old **ifaces);
int ctdb_ctrl_set_iface_link(struct ctdb_context *ctdb,
struct timeval timeout, uint32_t destnode,
TALLOC_CTX *mem_ctx,

View File

@ -1001,7 +1001,7 @@ struct ctdb_public_ip_info_old {
struct ctdb_iface ifaces[1];
};
struct ctdb_control_get_ifaces {
struct ctdb_iface_list_old {
uint32_t num;
struct ctdb_iface ifaces[1];
};

View File

@ -248,7 +248,7 @@ struct ctdb_recoverd {
struct srvid_requests *reallocate_requests;
struct ctdb_op_state *takeover_run;
struct ctdb_op_state *recovery;
struct ctdb_control_get_ifaces *ifaces;
struct ctdb_iface_list_old *ifaces;
uint32_t *force_rebalance_nodes;
struct ctdb_node_capabilities *caps;
};
@ -3255,7 +3255,7 @@ static enum monitor_result verify_recmaster(struct ctdb_recoverd *rec, struct ct
static bool interfaces_have_changed(struct ctdb_context *ctdb,
struct ctdb_recoverd *rec)
{
struct ctdb_control_get_ifaces *ifaces = NULL;
struct ctdb_iface_list_old *ifaces = NULL;
TALLOC_CTX *mem_ctx;
bool ret = false;

View File

@ -3312,7 +3312,7 @@ int32_t ctdb_control_get_ifaces(struct ctdb_context *ctdb,
TDB_DATA *outdata)
{
int i, num, len;
struct ctdb_control_get_ifaces *ifaces;
struct ctdb_iface_list_old *ifaces;
struct ctdb_interface *cur;
/* count how many public ip structures we have */
@ -3321,7 +3321,7 @@ int32_t ctdb_control_get_ifaces(struct ctdb_context *ctdb,
num++;
}
len = offsetof(struct ctdb_control_get_ifaces, ifaces) +
len = offsetof(struct ctdb_iface_list_old, ifaces) +
num*sizeof(struct ctdb_iface);
ifaces = talloc_zero_size(outdata, len);
CTDB_NO_MEMORY(ctdb, ifaces);
@ -3334,7 +3334,7 @@ int32_t ctdb_control_get_ifaces(struct ctdb_context *ctdb,
i++;
}
ifaces->num = i;
len = offsetof(struct ctdb_control_get_ifaces, ifaces) +
len = offsetof(struct ctdb_iface_list_old, ifaces) +
i*sizeof(struct ctdb_iface);
outdata->dsize = len;

View File

@ -114,7 +114,7 @@ int ctdb_ctrl_getnodesfile(struct ctdb_context *ctdb,
int ctdb_ctrl_get_ifaces(struct ctdb_context *ctdb,
struct timeval timeout, uint32_t destnode,
TALLOC_CTX *mem_ctx,
struct ctdb_control_get_ifaces **ifaces);
struct ctdb_iface_list_old **ifaces);
int ctdb_ctrl_getpnn(struct ctdb_context *ctdb, struct timeval timeout,
uint32_t destnode);
int ctdb_ctrl_getrecmode(struct ctdb_context *ctdb,

View File

@ -544,7 +544,7 @@ int32_t ctdb_control_get_ifaces(struct ctdb_context *ctdb,
TDB_DATA *outdata)
{
int i, num, len;
struct ctdb_control_get_ifaces *ifaces;
struct ctdb_iface_list_old *ifaces;
struct ctdb_interface *cur;
assert_ifaces_set(ctdb);
@ -555,7 +555,7 @@ int32_t ctdb_control_get_ifaces(struct ctdb_context *ctdb,
num++;
}
len = offsetof(struct ctdb_control_get_ifaces, ifaces) +
len = offsetof(struct ctdb_iface_list_old, ifaces) +
num*sizeof(struct ctdb_iface);
ifaces = talloc_zero_size(outdata, len);
CTDB_NO_MEMORY(ctdb, ifaces);
@ -573,7 +573,7 @@ int32_t ctdb_control_get_ifaces(struct ctdb_context *ctdb,
i++;
}
ifaces->num = i;
len = offsetof(struct ctdb_control_get_ifaces, ifaces) +
len = offsetof(struct ctdb_iface_list_old, ifaces) +
i*sizeof(struct ctdb_iface);
outdata->dsize = len;
@ -586,7 +586,7 @@ int
ctdb_ctrl_get_ifaces_stub(struct ctdb_context *ctdb,
struct timeval timeout, uint32_t destnode,
TALLOC_CTX *mem_ctx,
struct ctdb_control_get_ifaces **ifaces)
struct ctdb_iface_list_old **ifaces)
{
TDB_DATA *outdata;
int ret;
@ -600,7 +600,7 @@ ctdb_ctrl_get_ifaces_stub(struct ctdb_context *ctdb,
ret = ctdb_control_get_ifaces(ctdb, NULL, outdata);
if (ret == 0) {
*ifaces = (struct ctdb_control_get_ifaces *)outdata->dptr;
*ifaces = (struct ctdb_iface_list_old *)outdata->dptr;
}
return ret;

View File

@ -961,7 +961,7 @@ static bool is_partially_online(struct ctdb_context *ctdb, struct ctdb_node_and_
bool ret = false;
if (node->flags == 0) {
struct ctdb_control_get_ifaces *ifaces;
struct ctdb_iface_list_old *ifaces;
if (ctdb_ctrl_get_ifaces(ctdb, TIMELIMIT(), node->pnn,
tmp_ctx, &ifaces) == 0) {
@ -3138,7 +3138,7 @@ static int control_ifaces(struct ctdb_context *ctdb, int argc, const char **argv
{
TALLOC_CTX *tmp_ctx = talloc_new(ctdb);
int i;
struct ctdb_control_get_ifaces *ifaces;
struct ctdb_iface_list_old *ifaces;
int ret;
/* read the public ip list from this node */