From 8c135062e51b2ead38a756b045e7d243ffbda5a9 Mon Sep 17 00:00:00 2001 From: rl1987 Date: Sun, 2 Nov 2014 19:14:58 +0200 Subject: Adding 'SIGNAL HEARTBEAT' message that causes unscheduled heartbeat. --- src/or/control.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/or/control.c') diff --git a/src/or/control.c b/src/or/control.c index e3f913177b..5c65189bf2 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -1263,6 +1263,7 @@ static const struct signal_t signal_table[] = { { SIGTERM, "INT" }, { SIGNEWNYM, "NEWNYM" }, { SIGCLEARDNSCACHE, "CLEARDNSCACHE"}, + { SIGHEARTBEAT, "HEARTBEAT"}, { 0, NULL }, }; -- cgit v1.2.3-54-g00ecf From bf67a60b86b92f94d0c8b3c13edf4e8ff965c324 Mon Sep 17 00:00:00 2001 From: rl1987 Date: Tue, 4 Nov 2014 19:29:29 +0200 Subject: Sending response to SIGNAL HEARTBEAT controller command. --- src/or/control.c | 3 +++ src/or/main.c | 1 + 2 files changed, 4 insertions(+) (limited to 'src/or/control.c') diff --git a/src/or/control.c b/src/or/control.c index 5c65189bf2..37f33442ea 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -4455,6 +4455,9 @@ control_event_signal(uintptr_t signal) case SIGCLEARDNSCACHE: signal_string = "CLEARDNSCACHE"; break; + case SIGHEARTBEAT: + signal_string = "HEARTBEAT"; + break; default: log_warn(LD_BUG, "Unrecognized signal %lu in control_event_signal", (unsigned long)signal); diff --git a/src/or/main.c b/src/or/main.c index 6a6e36abc6..d33eeb9e59 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -2139,6 +2139,7 @@ process_signal(uintptr_t sig) break; case SIGHEARTBEAT: log_heartbeat(time(NULL)); + control_event_signal(sig); break; } } -- cgit v1.2.3-54-g00ecf