diff options
author | rl1987 <rl1987@sdf.lonestar.org> | 2014-11-16 15:51:23 +0200 |
---|---|---|
committer | rl1987 <rl1987@sdf.lonestar.org> | 2014-11-16 15:51:23 +0200 |
commit | 0db96d023b9a927d55c18c06f57b6cc0a9bd34de (patch) | |
tree | 0c59e6434effd60f72fb148d8d64689004f53b9e /src/or/directory.c | |
parent | ab08d8c4f7a4a6120756e964a086219a1dc3aaa2 (diff) | |
download | tor-0db96d023b9a927d55c18c06f57b6cc0a9bd34de.tar.gz tor-0db96d023b9a927d55c18c06f57b6cc0a9bd34de.zip |
Adding REASON field to HS_DESC FAILED controller event.
Diffstat (limited to 'src/or/directory.c')
-rw-r--r-- | src/or/directory.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index df9e7f8ad3..e1f5964e1e 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -2073,9 +2073,10 @@ connection_dir_client_reached_eof(dir_connection_t *conn) } if (conn->base_.purpose == DIR_PURPOSE_FETCH_RENDDESC_V2) { - #define SEND_HS_DESC_FAILED_EVENT() ( \ + #define SEND_HS_DESC_FAILED_EVENT(reason) ( \ control_event_hs_descriptor_failed(conn->rend_data, \ - conn->identity_digest) ) + conn->identity_digest, \ + reason) ) tor_assert(conn->rend_data); log_info(LD_REND,"Received rendezvous descriptor (size %d, status %d " "(%s))", @@ -2090,7 +2091,7 @@ connection_dir_client_reached_eof(dir_connection_t *conn) "Retrying at another directory."); /* We'll retry when connection_about_to_close_connection() * cleans this dir conn up. */ - SEND_HS_DESC_FAILED_EVENT(); + SEND_HS_DESC_FAILED_EVENT("BAD_DESC"); break; case RCS_OKAY: default: @@ -2109,14 +2110,14 @@ connection_dir_client_reached_eof(dir_connection_t *conn) * connection_about_to_close_connection() cleans this conn up. */ log_info(LD_REND,"Fetching v2 rendezvous descriptor failed: " "Retrying at another directory."); - SEND_HS_DESC_FAILED_EVENT(); + SEND_HS_DESC_FAILED_EVENT("NOT_FOUND"); break; case 400: log_warn(LD_REND, "Fetching v2 rendezvous descriptor failed: " "http status 400 (%s). Dirserver didn't like our " "v2 rendezvous query? Retrying at another directory.", escaped(reason)); - SEND_HS_DESC_FAILED_EVENT(); + SEND_HS_DESC_FAILED_EVENT("QUERY_REJECTED"); break; default: log_warn(LD_REND, "Fetching v2 rendezvous descriptor failed: " @@ -2125,7 +2126,7 @@ connection_dir_client_reached_eof(dir_connection_t *conn) "Retrying at another directory.", status_code, escaped(reason), conn->base_.address, conn->base_.port); - SEND_HS_DESC_FAILED_EVENT(); + SEND_HS_DESC_FAILED_EVENT("UNEXPECTED"); break; } } |