Skip to content

Commit

Permalink
ims_registrar_scscf: Set i to 0 before iterating
Browse files Browse the repository at this point in the history
  • Loading branch information
carstenbock committed Jan 27, 2015
1 parent 2a60538 commit 3999e92
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/ims_registrar_scscf/lookup.c
Expand Up @@ -94,6 +94,7 @@ int lookup(struct sip_msg* _m, udomain_t* _d) {
return -1;
}
ret = -1;
i = 0;

while (i < MAX_CONTACTS_PER_IMPU && (ptr = r->newcontacts[i])) {
if (VALID_CONTACT(ptr, act_time) && allowed_method(_m, ptr)) {
Expand All @@ -106,6 +107,7 @@ int lookup(struct sip_msg* _m, udomain_t* _d) {

/* look first for an un-expired and suported contact */
if (ptr == 0) {
LM_INFO("No contacts founds for IMPU <%.*s>\n",aor.len,aor.s);
/* nothing found */
goto done;
}
Expand Down

0 comments on commit 3999e92

Please sign in to comment.