diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 4d53ca3ab7..7d4ff1fd7e 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -1492,7 +1492,7 @@ static int __find_callno(unsigned short callno, unsigned short dcallno, struct s char host[80]; if (new <= NEW_ALLOW) { - for (x=1;(res < 1) && (x= NEW_ALLOW)) { + if (!res && (new >= NEW_ALLOW)) { int start, found = 0; /* It may seem odd that we look through the peer list for a name for