Module: kamailio
Branch: master
Commit: 6861995e417c40e9ab530d4c0bed97c57de184fd
URL:
https://github.com/kamailio/kamailio/commit/6861995e417c40e9ab530d4c0bed97c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-10-01T12:17:48+02:00
speeddial: fix stripping domain prefix
- increment the index after the value is adjusted
---
Modified: src/modules/speeddial/sdlookup.c
---
Diff:
https://github.com/kamailio/kamailio/commit/6861995e417c40e9ab530d4c0bed97c…
Patch:
https://github.com/kamailio/kamailio/commit/6861995e417c40e9ab530d4c0bed97c…
---
diff --git a/src/modules/speeddial/sdlookup.c b/src/modules/speeddial/sdlookup.c
index d9e52bf3cd..e26bc37bb8 100644
--- a/src/modules/speeddial/sdlookup.c
+++ b/src/modules/speeddial/sdlookup.c
@@ -117,7 +117,6 @@ int sd_lookup_owner(sip_msg_t* _msg, str* stable, str* sowner)
db_vals[nr_keys].nul = 0;
db_vals[nr_keys].val.str_val.s = puri->host.s;
db_vals[nr_keys].val.str_val.len = puri->host.len;
- nr_keys++;
if (dstrip_s.s!=NULL && dstrip_s.len>0
&& dstrip_s.len<puri->host.len
@@ -126,6 +125,7 @@ int sd_lookup_owner(sip_msg_t* _msg, str* stable, str* sowner)
db_vals[nr_keys].val.str_val.s += dstrip_s.len;
db_vals[nr_keys].val.str_val.len -= dstrip_s.len;
}
+ nr_keys++;
}
/* take sd from r-uri */
if (parse_sip_msg_uri(_msg) < 0)