Abolish superfluous channel_find_by_remote_nickname()

This commit is contained in:
Andrea Shepard 2012-10-08 19:52:04 -07:00
parent 64e6f6687c
commit 965c9de498
No known key found for this signature in database
GPG Key ID: 80BF498218A1E61B
2 changed files with 0 additions and 37 deletions

View File

@ -609,42 +609,6 @@ channel_find_by_remote_digest(const char *identity_digest)
return rv;
}
/**
* 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
*

View File

@ -368,7 +368,6 @@ int channel_is_better(time_t now,
channel_t * channel_find_by_global_id(uint64_t global_identifier);
channel_t * channel_find_by_remote_digest(const char *identity_digest);
channel_t * channel_find_by_remote_nickname(const char *nickname);
/** For things returned by channel_find_by_remote_digest(), walk the list.
*/