mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
ctdb-daemon: Drop struct ctdb_control_killtcp
Just use ctdb_tcp_connection. It is the same. There are no external users. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
parent
2a8b21e5ae
commit
bce6a386d3
@ -3071,13 +3071,13 @@ int ctdb_ctrl_del_public_ip(struct ctdb_context *ctdb,
|
||||
int ctdb_ctrl_killtcp(struct ctdb_context *ctdb,
|
||||
struct timeval timeout,
|
||||
uint32_t destnode,
|
||||
struct ctdb_control_killtcp *killtcp)
|
||||
struct ctdb_tcp_connection *killtcp)
|
||||
{
|
||||
TDB_DATA data;
|
||||
int32_t res;
|
||||
int ret;
|
||||
|
||||
data.dsize = sizeof(struct ctdb_control_killtcp);
|
||||
data.dsize = sizeof(struct ctdb_tcp_connection);
|
||||
data.dptr = (unsigned char *)killtcp;
|
||||
|
||||
ret = ctdb_control(ctdb, destnode, 0, CTDB_CONTROL_KILL_TCP, 0, data, NULL,
|
||||
|
@ -607,14 +607,6 @@ struct ctdb_db_context {
|
||||
ctdb_fatal(ctdb, "Out of memory in " __location__ ); \
|
||||
}} while (0)
|
||||
|
||||
/*
|
||||
struct for kill_tcp control
|
||||
*/
|
||||
struct ctdb_control_killtcp {
|
||||
ctdb_sock_addr src_addr;
|
||||
ctdb_sock_addr dst_addr;
|
||||
};
|
||||
|
||||
/*
|
||||
struct holding a ctdb_sock_addr and an interface name,
|
||||
used to add/remove public addresses
|
||||
@ -1215,7 +1207,7 @@ int ctdb_sys_read_tcp_packet(int s, void *private_data, ctdb_sock_addr *src, ctd
|
||||
int ctdb_ctrl_killtcp(struct ctdb_context *ctdb,
|
||||
struct timeval timeout,
|
||||
uint32_t destnode,
|
||||
struct ctdb_control_killtcp *killtcp);
|
||||
struct ctdb_tcp_connection *killtcp);
|
||||
|
||||
int ctdb_ctrl_add_public_ip(struct ctdb_context *ctdb,
|
||||
struct timeval timeout,
|
||||
|
@ -403,7 +403,7 @@ static int32_t ctdb_control_dispatch(struct ctdb_context *ctdb,
|
||||
return ctdb_control_modflags(ctdb, indata);
|
||||
|
||||
case CTDB_CONTROL_KILL_TCP:
|
||||
CHECK_CONTROL_DATA_SIZE(sizeof(struct ctdb_control_killtcp));
|
||||
CHECK_CONTROL_DATA_SIZE(sizeof(struct ctdb_tcp_connection));
|
||||
return ctdb_control_kill_tcp(ctdb, indata);
|
||||
|
||||
case CTDB_CONTROL_GET_TCP_TICKLE_LIST:
|
||||
|
@ -3714,7 +3714,7 @@ failed:
|
||||
*/
|
||||
int32_t ctdb_control_kill_tcp(struct ctdb_context *ctdb, TDB_DATA indata)
|
||||
{
|
||||
struct ctdb_control_killtcp *killtcp = (struct ctdb_control_killtcp *)indata.dptr;
|
||||
struct ctdb_tcp_connection *killtcp = (struct ctdb_tcp_connection *)indata.dptr;
|
||||
|
||||
return ctdb_killtcp_add_connection(ctdb, &killtcp->src_addr, &killtcp->dst_addr);
|
||||
}
|
||||
|
@ -2606,7 +2606,7 @@ static int control_delip(struct ctdb_context *ctdb, int argc, const char **argv)
|
||||
static int kill_tcp_from_file(struct ctdb_context *ctdb,
|
||||
int argc, const char **argv)
|
||||
{
|
||||
struct ctdb_control_killtcp *killtcp;
|
||||
struct ctdb_tcp_connection *killtcp;
|
||||
int max_entries, current, i;
|
||||
struct timeval timeout;
|
||||
char line[128], src[128], dst[128];
|
||||
@ -2643,7 +2643,7 @@ static int kill_tcp_from_file(struct ctdb_context *ctdb,
|
||||
if (current >= max_entries) {
|
||||
max_entries += 1024;
|
||||
killtcp = talloc_realloc(ctdb, killtcp,
|
||||
struct ctdb_control_killtcp,
|
||||
struct ctdb_tcp_connection,
|
||||
max_entries);
|
||||
CTDB_NO_MEMORY(ctdb, killtcp);
|
||||
}
|
||||
@ -2673,7 +2673,7 @@ static int kill_tcp_from_file(struct ctdb_context *ctdb,
|
||||
|
||||
for (i = 0; i < current; i++) {
|
||||
|
||||
data.dsize = sizeof(struct ctdb_control_killtcp);
|
||||
data.dsize = sizeof(struct ctdb_tcp_connection);
|
||||
data.dptr = (unsigned char *)&killtcp[i];
|
||||
|
||||
timeout = TIMELIMIT();
|
||||
@ -2709,7 +2709,7 @@ static int kill_tcp_from_file(struct ctdb_context *ctdb,
|
||||
static int kill_tcp(struct ctdb_context *ctdb, int argc, const char **argv)
|
||||
{
|
||||
int ret;
|
||||
struct ctdb_control_killtcp killtcp;
|
||||
struct ctdb_tcp_connection killtcp;
|
||||
|
||||
assert_single_node_only();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user