summaryrefslogtreecommitdiffstats
path: root/ctdb/server/eventscript.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2009-12-07 23:18:40 +1030
committerRusty Russell <rusty@rustcorp.com.au>2009-12-07 23:18:40 +1030
commit5190932507490b1b1f4764e05f8c0ec2d42db275 (patch)
treea89e34c7d0ffd3ea33423f5c38a8fdb743eb2e39 /ctdb/server/eventscript.c
parent0dd46797d6a2f9f9d5e0ea2c30a161789351227a (diff)
downloadsamba-5190932507490b1b1f4764e05f8c0ec2d42db275.tar.gz
samba-5190932507490b1b1f4764e05f8c0ec2d42db275.tar.xz
samba-5190932507490b1b1f4764e05f8c0ec2d42db275.zip
eventscript: expost ctdb_ban_self()
eventscript.c uses this now, but our next patch makes others use it. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (This used to be ctdb commit a305cb7743c24386e464f6b2efab7e2108bb1e7e)
Diffstat (limited to 'ctdb/server/eventscript.c')
-rw-r--r--ctdb/server/eventscript.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/ctdb/server/eventscript.c b/ctdb/server/eventscript.c
index f24f13bedc..a6d3950bad 100644
--- a/ctdb/server/eventscript.c
+++ b/ctdb/server/eventscript.c
@@ -623,21 +623,6 @@ static void ctdb_event_script_handler(struct event_context *ev, struct fd_event
talloc_free(state);
}
-static void ctdb_ban_self(struct ctdb_context *ctdb, uint32_t ban_period)
-{
- TDB_DATA data;
- struct ctdb_ban_time bantime;
-
- bantime.pnn = ctdb->pnn;
- bantime.time = ban_period;
-
- data.dsize = sizeof(bantime);
- data.dptr = (uint8_t *)&bantime;
-
- ctdb_control_set_ban_state(ctdb, data);
-}
-
-
/* called when child times out */
static void ctdb_event_script_timeout(struct event_context *ev, struct timed_event *te,
struct timeval t, void *p)
@@ -680,7 +665,7 @@ static void ctdb_event_script_timeout(struct event_context *ev, struct timed_eve
*/
DEBUG(DEBUG_ERR, (__location__ " eventscript for NON-monitor/NON-startup event timedout. Immediately banning ourself for %d seconds\n", ctdb->tunable.recovery_ban_period));
- ctdb_ban_self(ctdb, ctdb->tunable.recovery_ban_period);
+ ctdb_ban_self(ctdb);
state->cb_status = -ETIME;
}