diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-04-27 09:27:00 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-04-27 09:27:00 -0400 |
commit | 52316f9969a049ec5e2d72c2f0002f0ed32b60cb (patch) | |
tree | a9ed713d2fe2635f775d07604f1912557b3b89de /src/or | |
parent | 0f6420e53aa33a9e754f1d6c3c5bec12ac65f153 (diff) | |
download | tor-52316f9969a049ec5e2d72c2f0002f0ed32b60cb.tar.gz tor-52316f9969a049ec5e2d72c2f0002f0ed32b60cb.zip |
Include UPLOAD_RENDDESC_V2 in PURPOSE_IS_UPLOAD
This was only used in one place before, and it's safe to update it.
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/directory.c | 4 | ||||
-rw-r--r-- | src/or/or.h | 7 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index 7767bb99d1..872cce2c9e 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -1171,9 +1171,7 @@ directory_request_set_payload(directory_request_t *req, const char *payload, size_t payload_len) { - tor_assert(DIR_PURPOSE_IS_UPLOAD(req->dir_purpose) || - // XXXX why not included? - req->dir_purpose == DIR_PURPOSE_UPLOAD_RENDDESC_V2); + tor_assert(DIR_PURPOSE_IS_UPLOAD(req->dir_purpose)); req->payload = payload; req->payload_len = payload_len; diff --git a/src/or/or.h b/src/or/or.h index 21b8ca5018..5a42aada50 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -423,12 +423,13 @@ typedef enum { #define DIR_PURPOSE_FETCH_MICRODESC 19 #define DIR_PURPOSE_MAX_ 19 -/** True iff <b>p</b> is a purpose corresponding to uploading data to a - * directory server. */ +/** True iff <b>p</b> is a purpose corresponding to uploading + * data to a directory server. */ #define DIR_PURPOSE_IS_UPLOAD(p) \ ((p)==DIR_PURPOSE_UPLOAD_DIR || \ (p)==DIR_PURPOSE_UPLOAD_VOTE || \ - (p)==DIR_PURPOSE_UPLOAD_SIGNATURES) + (p)==DIR_PURPOSE_UPLOAD_SIGNATURES || \ + (p)==DIR_PURPOSE_UPLOAD_RENDDESC_V2) #define EXIT_PURPOSE_MIN_ 1 /** This exit stream wants to do an ordinary connect. */ |