]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: peers: store the pointer to the signal handler
authorWilly Tarreau <w@1wt.eu>
Fri, 1 May 2015 16:29:09 +0000 (18:29 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 1 May 2015 18:16:31 +0000 (20:16 +0200)
We'll need it to unregister stopped peers sections.

include/types/peers.h
src/peers.c

index 8b7712abd7d59e55876c0892efc6e8904676bdb8..fbe2506c8a7e518c3bd7af7f976e2fc74343a0a4 100644 (file)
@@ -57,6 +57,7 @@ struct peer_session {
 struct shared_table {
        struct stktable *table;             /* stick table to sync */
        struct task *sync_task;             /* main sync task */
+       struct sig_handler *sighandler;     /* signal handler */
        struct peer_session *local_session; /* local peer session */
        struct peer_session *sessions;      /* peer sessions list */
        unsigned int flags;                 /* current table resync state */
index d637e88d6e53e57114b00912b64ba4cd5bbb9772..d39898a5746f6cfacaa4fecdf0719c6fc6dcee66 100644 (file)
@@ -1393,8 +1393,8 @@ void peers_register_table(struct peers *peers, struct stktable *table)
        st->sync_task->process = process_peer_sync;
        st->sync_task->expire = TICK_ETERNITY;
        st->sync_task->context = (void *)st;
-       table->sync_task =st->sync_task;
-       signal_register_task(0, table->sync_task, 0);
+       table->sync_task = st->sync_task;
+       st->sighandler = signal_register_task(0, table->sync_task, 0);
        task_wakeup(st->sync_task, TASK_WOKEN_INIT);
 }