Module: kamailio
Branch: master
Commit: 72d2a19453b114a35d73e066eb450911521a5c13
URL:
https://github.com/kamailio/kamailio/commit/72d2a19453b114a35d73e066eb45091…
Author: Carsten Bock <carsten(a)ng-voice.com>
Committer: Carsten Bock <carsten(a)ng-voice.com>
Date: 2015-01-27T18:06:26+02:00
ims_usrloc_scscf: Set i to 0 before iterating
---
Modified: modules/ims_usrloc_scscf/ul_rpc.c
---
Diff:
https://github.com/kamailio/kamailio/commit/72d2a19453b114a35d73e066eb45091…
Patch:
https://github.com/kamailio/kamailio/commit/72d2a19453b114a35d73e066eb45091…
---
diff --git a/modules/ims_usrloc_scscf/ul_rpc.c b/modules/ims_usrloc_scscf/ul_rpc.c
index de6162a..b393254 100644
--- a/modules/ims_usrloc_scscf/ul_rpc.c
+++ b/modules/ims_usrloc_scscf/ul_rpc.c
@@ -135,6 +135,8 @@ static void ul_rpc_show_impu(rpc_t* rpc, void* ctx) {
return;
}
+ i = 0;
+
if (impu_rec->num_contacts > 0 && impu_rec->newcontacts[0]) {
while (i < MAX_CONTACTS_PER_IMPU && (contact =
impu_rec->newcontacts[i++])) {
//contact is not null terminated so we need to create a null terminated version