mirror of
https://github.com/samba-team/samba.git
synced 2025-03-09 08:58:35 +03:00
ensure killtcp structure is initialised
(This used to be ctdb commit 2fe7d1ce87e55e125411e7406a9e00b8f55e3cb7)
This commit is contained in:
parent
1e14ecd176
commit
8f637e6317
@ -908,7 +908,8 @@ static void capture_tcp_handler(struct event_context *ev, struct fd_event *fde,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* called every second until all sentenced connections have been reset
|
/*
|
||||||
|
called every second until all sentenced connections have been reset
|
||||||
*/
|
*/
|
||||||
static void ctdb_tickle_sentenced_connections(struct event_context *ev, struct timed_event *te,
|
static void ctdb_tickle_sentenced_connections(struct event_context *ev, struct timed_event *te,
|
||||||
struct timeval t, void *private_data)
|
struct timeval t, void *private_data)
|
||||||
@ -976,7 +977,7 @@ static int ctdb_killtcp_add_connection(struct ctdb_context *ctdb,
|
|||||||
a new structure
|
a new structure
|
||||||
*/
|
*/
|
||||||
if (killtcp == NULL) {
|
if (killtcp == NULL) {
|
||||||
killtcp = talloc(ctdb, struct ctdb_kill_tcp);
|
killtcp = talloc_zero(ctdb, struct ctdb_kill_tcp);
|
||||||
CTDB_NO_MEMORY(ctdb, killtcp);
|
CTDB_NO_MEMORY(ctdb, killtcp);
|
||||||
|
|
||||||
killtcp->ctdb = ctdb;
|
killtcp->ctdb = ctdb;
|
||||||
@ -1027,7 +1028,7 @@ static int ctdb_killtcp_add_connection(struct ctdb_context *ctdb,
|
|||||||
/* We also need to set up some events to tickle all these connections
|
/* We also need to set up some events to tickle all these connections
|
||||||
until they are all reset
|
until they are all reset
|
||||||
*/
|
*/
|
||||||
event_add_timed(ctdb->ev, killtcp, timeval_current_ofs(0, 0),
|
event_add_timed(ctdb->ev, killtcp, timeval_zero(),
|
||||||
ctdb_tickle_sentenced_connections, killtcp);
|
ctdb_tickle_sentenced_connections, killtcp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user