aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/versions.c
diff options
context:
space:
mode:
authorteor <teor@riseup.net>2020-05-15 23:34:00 +1000
committerteor <teor@riseup.net>2020-05-15 23:34:43 +1000
commit277baf676be4b869e43e7db8aa1a18930506e622 (patch)
treec82c648377f3eff5623cc44e492d30172e4f6ddc /src/core/or/versions.c
parenta702e92c82c627280c4c9f1d2f3b183b01d78226 (diff)
downloadtor-277baf676be4b869e43e7db8aa1a18930506e622.tar.gz
tor-277baf676be4b869e43e7db8aa1a18930506e622.zip
versions: Improve the protover summary comments
Part of 33222.
Diffstat (limited to 'src/core/or/versions.c')
-rw-r--r--src/core/or/versions.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/or/versions.c b/src/core/or/versions.c
index 410a009ba7..11e2504e19 100644
--- a/src/core/or/versions.c
+++ b/src/core/or/versions.c
@@ -408,6 +408,10 @@ static strmap_t *protover_summary_map = NULL;
/**
* Helper. Given a non-NULL protover string <b>protocols</b>, set <b>out</b>
* to its summary, and memoize the result in <b>protover_summary_map</b>.
+ *
+ * If the protover string does not contain any recognised protocols, sets
+ * protocols_known, but does not set any other flags. (Empty strings are also
+ * treated this way.)
*/
static void
memoize_protover_summary(protover_summary_flags_t *out,
@@ -485,6 +489,13 @@ memoize_protover_summary(protover_summary_flags_t *out,
/** Summarize the protocols listed in <b>protocols</b> into <b>out</b>,
* falling back or correcting them based on <b>version</b> as appropriate.
+ *
+ * If protocols and version are both NULL, returns a summary with no flags
+ * set.
+ *
+ * If the protover string does not contain any recognised protocols, and the
+ * version is not recognised, sets protocols_known, but does not set any other
+ * flags. (Empty strings are also treated this way.)
*/
void
summarize_protover_flags(protover_summary_flags_t *out,