diff options
author | Andrea Shepard <andrea@torproject.org> | 2012-10-08 19:52:04 -0700 |
---|---|---|
committer | Andrea Shepard <andrea@torproject.org> | 2012-10-08 19:52:04 -0700 |
commit | 965c9de498ab7f6c7ce3dce133bb34456f3d668e (patch) | |
tree | f704656af686509f641529340a837270544b360c /src/or/channel.c | |
parent | 64e6f6687c8fc275ddc207fa43f29c4213d3cad2 (diff) | |
download | tor-965c9de498ab7f6c7ce3dce133bb34456f3d668e.tar.gz tor-965c9de498ab7f6c7ce3dce133bb34456f3d668e.zip |
Abolish superfluous channel_find_by_remote_nickname()
Diffstat (limited to 'src/or/channel.c')
-rw-r--r-- | src/or/channel.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/or/channel.c b/src/or/channel.c index 690bfb92a7..9b814bb655 100644 --- a/src/or/channel.c +++ b/src/or/channel.c @@ -610,42 +610,6 @@ channel_find_by_remote_digest(const char *identity_digest) } /** - * Find channel by remote nickname - * - * This function looks up a channel by the nickname of the remote - * endpoint. It's possible that more than one channel to that endpoint - * nickname exists, but there is not currently any supported way to iterate - * them. Use digests. - * - * @param nickname A node nickname - * @return A channel pointer to a channel to a node with that nickname, or - * NULL if none is available. - */ - -channel_t * -channel_find_by_remote_nickname(const char *nickname) -{ - channel_t *rv = NULL; - - tor_assert(nickname); - - if (all_channels && smartlist_len(all_channels) > 0) { - SMARTLIST_FOREACH_BEGIN(all_channels, channel_t *, curr) { - if (!(curr->is_listener)) { - if (curr->u.cell_chan.nickname && - strncmp(curr->u.cell_chan.nickname, nickname, - MAX_NICKNAME_LEN) == 0) { - rv = curr; - break; - } - } - } SMARTLIST_FOREACH_END(curr); - } - - return rv; -} - -/** * Next channel with digest * * This function takes a channel and finds the next channel in the list |