diff options
author | Donncha O'Cearbhaill <donncha@donncha.is> | 2015-08-04 14:47:51 +0200 |
---|---|---|
committer | Donncha O'Cearbhaill <donncha@donncha.is> | 2015-09-08 12:34:05 +0200 |
commit | 293410d1384742fe0da2f760707e3a282f4056b2 (patch) | |
tree | 8cc3f08acab21bc06a662126372c121c90dd2540 /src/or/control.c | |
parent | 0bd68bf98617607f5ca0f98e4d67bf66c6b5b210 (diff) | |
download | tor-293410d1384742fe0da2f760707e3a282f4056b2.tar.gz tor-293410d1384742fe0da2f760707e3a282f4056b2.zip |
Add replica number to HS_DESC CREATED event
Including the replica number in the HS_DESC CREATED event provides
more context to a control port client. The replica allows clients
to more easily identify each replicated descriptor from the
independantly output control events.
Diffstat (limited to 'src/or/control.c')
-rw-r--r-- | src/or/control.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/or/control.c b/src/or/control.c index c2240bf38c..2408793bd7 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -6255,10 +6255,12 @@ get_desc_id_from_query(const rend_data_t *rend_data, const char *hsdir_fp) * * <b>service_id</b> is the descriptor onion address. * <b>desc_id_base32</b> is the descriptor ID. + * <b>replica</b> is the the descriptor replica number. */ void control_event_hs_descriptor_created(const char *service_id, - const char *desc_id_base32) + const char *desc_id_base32, + int replica) { if (!service_id || !desc_id_base32) { log_warn(LD_BUG, "Called with service_digest==%p, " @@ -6267,9 +6269,11 @@ control_event_hs_descriptor_created(const char *service_id, } send_control_event(EVENT_HS_DESC, - "650 HS_DESC CREATED %s UNKNOWN UNKNOWN %s\r\n", + "650 HS_DESC CREATED %s UNKNOWN UNKNOWN %s " + "REPLICA=%d\r\n", service_id, - desc_id_base32); + desc_id_base32, + replica); } /** send HS_DESC upload event. |