diff options
author | David Goulet <dgoulet@torproject.org> | 2017-11-10 15:08:05 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-12-05 19:39:46 -0500 |
commit | 13bb4f60f0dc390ac92c8963bbf32ee55187d7b5 (patch) | |
tree | dcece24912ddda736952d875088fc17d9918cf05 /src/or | |
parent | 427b247c8d67baf2382755a3855f8ea380068107 (diff) | |
download | tor-13bb4f60f0dc390ac92c8963bbf32ee55187d7b5.tar.gz tor-13bb4f60f0dc390ac92c8963bbf32ee55187d7b5.zip |
hs-v3: Support HS_DESC UPLOAD failed
When failing to upload a descriptor, signal the control port with a FAILED
event.
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/directory.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index cbd7af075c..ae8bf6eb05 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -3314,7 +3314,8 @@ handle_response_upload_hsdesc(dir_connection_t *conn, "status 400 (%s) response from dirserver " "'%s:%d'. Malformed hidden service descriptor?", escaped(reason), conn->base_.address, conn->base_.port); - /* XXX: Trigger control event. */ + hs_control_desc_event_failed(conn->hs_ident, conn->identity_digest, + "UPLOAD_REJECTED"); break; default: log_warn(LD_REND, "Uploading hidden service descriptor: http " @@ -3322,7 +3323,8 @@ handle_response_upload_hsdesc(dir_connection_t *conn, "'%s:%d').", status_code, escaped(reason), conn->base_.address, conn->base_.port); - /* XXX: Trigger control event. */ + hs_control_desc_event_failed(conn->hs_ident, conn->identity_digest, + "UNEXPECTED"); break; } |