summaryrefslogtreecommitdiff
path: root/src/or/circuitlist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-08-29 15:02:11 -0400
committerNick Mathewson <nickm@torproject.org>2016-08-29 15:02:11 -0400
commitbbaa7d09a045130560a2f5da579671c5e02c9cd7 (patch)
tree232540453f40eb00b2dc0492b236967f383627e8 /src/or/circuitlist.c
parentf46ce6e3d8bea3cf00388c87c29cdcafd4bab350 (diff)
parent19816f2f782568722964d35ee132af441a809db3 (diff)
downloadtor-bbaa7d09a045130560a2f5da579671c5e02c9cd7.tar.gz
tor-bbaa7d09a045130560a2f5da579671c5e02c9cd7.zip
Merge remote-tracking branch 'teor/reject-tap-v6'
Diffstat (limited to 'src/or/circuitlist.c')
-rw-r--r--src/or/circuitlist.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c
index 5c691644a4..3c92baa274 100644
--- a/src/or/circuitlist.c
+++ b/src/or/circuitlist.c
@@ -1613,7 +1613,8 @@ circuit_find_to_cannibalize(uint8_t purpose, extend_info_t *info,
return best;
}
-/** Return the number of hops in circuit's path. */
+/** Return the number of hops in circuit's path. If circ has no entries,
+ * or is NULL, returns 0. */
int
circuit_get_cpath_len(origin_circuit_t *circ)
{
@@ -1629,7 +1630,8 @@ circuit_get_cpath_len(origin_circuit_t *circ)
}
/** Return the <b>hopnum</b>th hop in <b>circ</b>->cpath, or NULL if there
- * aren't that many hops in the list. */
+ * aren't that many hops in the list. <b>hopnum</b> starts at 1.
+ * Returns NULL if <b>hopnum</b> is 0 or negative. */
crypt_path_t *
circuit_get_cpath_hop(origin_circuit_t *circ, int hopnum)
{