summaryrefslogtreecommitdiff
path: root/src/or/control.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/control.c')
-rw-r--r--src/or/control.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/or/control.c b/src/or/control.c
index d237f8feb1..fb74d7d6f3 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -6233,6 +6233,27 @@ get_desc_id_from_query(const rend_data_t *rend_data, const char *hsdir_fp)
return desc_id;
}
+/** send HS_DESC CREATED event when a local service generates a descriptor.
+ *
+ * <b>service_id</b> is the descriptor onion address.
+ * <b>desc_id_base32</b> is the descriptor ID.
+ */
+void
+control_event_hs_descriptor_created(const char *service_id,
+ const char *desc_id_base32)
+{
+ if (!service_id || !desc_id_base32) {
+ log_warn(LD_BUG, "Called with service_digest==%p, "
+ "desc_id_base32==%p", service_id, desc_id_base32);
+ return;
+ }
+
+ send_control_event(EVENT_HS_DESC,
+ "650 HS_DESC CREATED %s UNKNOWN UNKNOWN %s\r\n",
+ service_id,
+ desc_id_base32);
+}
+
/** send HS_DESC upload event.
*
* <b>service_id</b> is the descriptor onion address.