Module: kamailio
Branch: master
Commit: 08854a8754ad97885c6e7a94bcc1ae8136d2ba3d
URL:
https://github.com/kamailio/kamailio/commit/08854a8754ad97885c6e7a94bcc1ae8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-04-18T17:24:00+02:00
core: condition to stop looking up exported functions by name
---
Modified: kemi.c
---
Diff:
https://github.com/kamailio/kamailio/commit/08854a8754ad97885c6e7a94bcc1ae8…
Patch:
https://github.com/kamailio/kamailio/commit/08854a8754ad97885c6e7a94bcc1ae8…
---
diff --git a/kemi.c b/kemi.c
index 3f45715..38a08fc 100644
--- a/kemi.c
+++ b/kemi.c
@@ -164,7 +164,7 @@ sr_kemi_t* sr_kemi_lookup(str *mname, int midx, str *fname)
sr_kemi_t *ket;
if(mname==NULL || mname->len<=0) {
- for(i=0; ; i++) {
+ for(i=0; _sr_kemi_core[i].fname.s!=NULL; i++) {
ket = &_sr_kemi_core[i];
if(ket->fname.len==fname->len
&& strncasecmp(ket->fname.s, fname->s, fname->len)==0) {
@@ -173,7 +173,7 @@ sr_kemi_t* sr_kemi_lookup(str *mname, int midx, str *fname)
}
} else {
if(midx>0 && midx<SR_KEMI_MODULES_MAX_SIZE) {
- for(i=0; ; i++) {
+ for(i=0; _sr_kemi_core[i].fname.s!=NULL; i++) {
ket = &_sr_kemi_modules[midx].kexp[i];
if(ket->fname.len==fname->len
&& strncasecmp(ket->fname.s, fname->s, fname->len)==0) {