summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-10-17 11:29:37 -0400
committerNick Mathewson <nickm@torproject.org>2012-10-17 11:29:37 -0400
commitcb9d1237641290dc92b11540b96db036748429be (patch)
tree97c9409c1459209c065f0a58feb7dacf3d4952c2
parent26946c659b5abdc38fd4dc8cd4b4659aadcf05f0 (diff)
downloadtor-cb9d1237641290dc92b11540b96db036748429be.tar.gz
tor-cb9d1237641290dc92b11540b96db036748429be.zip
Document lifespan of return values of the _remote_descr() funcs
-rw-r--r--src/or/channel.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/or/channel.c b/src/or/channel.c
index 13aa007fc0..3acb509a14 100644
--- a/src/or/channel.c
+++ b/src/or/channel.c
@@ -3475,8 +3475,10 @@ channel_listener_dump_transport_statistics(channel_listener_t *chan_l,
* This function return a test provided by the lower layer of the remote
* endpoint for this channel; it should specify the actual address connected
* to/from.
+ *
+ * Subsequent calls to channel_get_{actual,canonical}_remote_{address,descr}
+ * may invalidate the return value from this function.
*/
-
const char *
channel_get_actual_remote_descr(channel_t *chan)
{
@@ -3487,7 +3489,12 @@ channel_get_actual_remote_descr(channel_t *chan)
return chan->get_remote_descr(chan, GRD_FLAG_ORIGINAL);
}
-/** DOCDOC */
+/**
+ * Return the text address of the remote endpoint.
+ *
+ * Subsequent calls to channel_get_{actual,canonical}_remote_{address,descr}
+ * may invalidate the return value from this function.
+ */
const char *
channel_get_actual_remote_address(channel_t *chan)
{
@@ -3501,8 +3508,10 @@ channel_get_actual_remote_address(channel_t *chan)
* This function return a test provided by the lower layer of the remote
* endpoint for this channel; it should use the known canonical address for
* this OR's identity digest if possible.
+ *
+ * Subsequent calls to channel_get_{actual,canonical}_remote_{address,descr}
+ * may invalidate the return value from this function.
*/
-
const char *
channel_get_canonical_remote_descr(channel_t *chan)
{