diff options
author | Andrea Shepard <andrea@torproject.org> | 2015-01-15 15:19:31 +0000 |
---|---|---|
committer | Andrea Shepard <andrea@torproject.org> | 2015-01-15 15:19:31 +0000 |
commit | f7bb60e2020a4a655b77b0b3d86669210a3cd0c0 (patch) | |
tree | 037a98195bc5f889968dca7868f5fdbd5d3300a0 /src/or/rendclient.c | |
parent | 3668a4126e0c2502a77c2ba5d7885add489a964a (diff) | |
download | tor-f7bb60e2020a4a655b77b0b3d86669210a3cd0c0.tar.gz tor-f7bb60e2020a4a655b77b0b3d86669210a3cd0c0.zip |
Add comments in rendclient.c noting that certain functions involved in handling ended HS connection attempts must be idempotent
Diffstat (limited to 'src/or/rendclient.c')
-rw-r--r-- | src/or/rendclient.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/or/rendclient.c b/src/or/rendclient.c index 8cace92b2c..75c7b9ae92 100644 --- a/src/or/rendclient.c +++ b/src/or/rendclient.c @@ -547,7 +547,12 @@ directory_clean_last_hid_serv_requests(time_t now) /** Remove all requests related to the hidden service named * <b>onion_address</b> from the history of times of requests to - * hidden service directories. */ + * hidden service directories. + * + * This is called from rend_client_note_connection_attempt_ended(), which + * must be idempotent, so any future changes to this function must leave + * it idempotent too. + */ static void purge_hid_serv_from_last_hid_serv_requests(const char *onion_address) { @@ -1076,8 +1081,11 @@ rend_client_desc_trynow(const char *query) /** Clear temporary state used only during an attempt to connect to * the hidden service named <b>onion_address</b>. Called when a - * connection attempt has ended; may be called occasionally at other - * times, and should be reasonably harmless. */ + * connection attempt has ended; it is possible for this to be called + * multiple times while handling an ended connection attempt, and + * any future changes to this functio n must ensure it remains + * idempotent. + */ void rend_client_note_connection_attempt_ended(const char *onion_address) { |