summaryrefslogtreecommitdiff
path: root/src/feature/control/control.c
diff options
context:
space:
mode:
authorAlexander Færøy <ahf@torproject.org>2018-12-20 03:55:02 +0100
committerAlexander Færøy <ahf@torproject.org>2018-12-20 03:55:02 +0100
commit4efe4cc2f918ce45075b010d2cdc09ec7791ac6b (patch)
treecde7a4670aa361d00aa3a6c251ed19b572d018d5 /src/feature/control/control.c
parent426c52b377057dc5f4428c664ee56ca77d648c9e (diff)
downloadtor-4efe4cc2f918ce45075b010d2cdc09ec7791ac6b.tar.gz
tor-4efe4cc2f918ce45075b010d2cdc09ec7791ac6b.zip
Add support for STATUS messages from Pluggable Transports.
This patch adds support for the new STATUS message that PT's can emit from their standard out. The STATUS message uses the `config_line_t` K/V format that was recently added in Tor. See: https://bugs.torproject.org/28846
Diffstat (limited to 'src/feature/control/control.c')
-rw-r--r--src/feature/control/control.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/feature/control/control.c b/src/feature/control/control.c
index 849f11707e..4ef550c919 100644
--- a/src/feature/control/control.c
+++ b/src/feature/control/control.c
@@ -7043,6 +7043,16 @@ control_event_pt_log(const char *log)
log);
}
+/** A pluggable transport has emitted a STATUS message found in
+ * <b>status</b>. */
+void
+control_event_pt_status(const char *status)
+{
+ send_control_event(EVENT_PT_STATUS,
+ "650 PT_STATUS %s\r\n",
+ status);
+}
+
/** Convert rendezvous auth type to string for HS_DESC control events
*/
const char *