Skip to content
Snippets Groups Projects
Commit 13787bc5 authored by Jeff Peeler's avatar Jeff Peeler
Browse files

This one line change makes an if inside a for loop (in realtime_peer) check...

This one line change makes an if inside a for loop (in realtime_peer) check all the ast_variables the loop was intending to test rather than just the first one.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110726 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent c6453ded
No related branches found
No related tags found
No related merge requests found
......@@ -3606,7 +3606,7 @@ static struct sip_peer *realtime_peer(const char *newpeername, struct sockaddr_i
*/
if (var) {
for (tmp = var; tmp; tmp = tmp->next) {
if (!strcasecmp(var->name, "host")) {
if (!strcasecmp(tmp->name, "host")) {
struct hostent *hp;
struct ast_hostent ahp;
if (!(hp = ast_gethostbyname(tmp->value, &ahp)) || (memcmp(&hp->h_addr, &sin->sin_addr, sizeof(hp->h_addr)))) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment