Module: kamailio
Branch: master
Commit: 1cb90ab109b574a987d0a2bff915112243c51c30
URL:
https://github.com/kamailio/kamailio/commit/1cb90ab109b574a987d0a2bff915112…
Author: Carsten Bock <carsten(a)ng-voice.com>
Committer: Carsten Bock <carsten(a)ng-voice.com>
Date: 2015-01-27T15:42:54+02:00
ims_registrar_scscf: Fix previous commit in order to properly lookup tel: URI in
ims_registrar_scscf
---
Modified: modules/ims_registrar_scscf/lookup.c
---
Diff:
https://github.com/kamailio/kamailio/commit/1cb90ab109b574a987d0a2bff915112…
Patch:
https://github.com/kamailio/kamailio/commit/1cb90ab109b574a987d0a2bff915112…
---
diff --git a/modules/ims_registrar_scscf/lookup.c b/modules/ims_registrar_scscf/lookup.c
index ee89d39..067cb3b 100644
--- a/modules/ims_registrar_scscf/lookup.c
+++ b/modules/ims_registrar_scscf/lookup.c
@@ -68,26 +68,21 @@ int lookup(struct sip_msg* _m, udomain_t* _d) {
flag_t old_bflags;
int i = 0;
- req = _m;
- if (!req){
+ if (!_m){
LM_ERR("NULL message!!!\n");
return -1;
}
- if (req->first_line.type!=SIP_REQUEST){
- req = get_request_from_reply(req);
- }
+
+ if (_m->new_uri.s) aor = _m->new_uri;
+ else aor = _m->first_line.u.request.uri;
- if (_m->new_uri.s) uri = _m->new_uri;
- else uri = _m->first_line.u.request.uri;
-
- for(i=0;i<uri.len;i++)
- if (uri.s[i]==';' || uri.s[i]=='?') {
- uri.len = i;
+ for(i=0;i<aor.len;i++)
+ if (aor.s[i]==';' || aor.s[i]=='?') {
+ aor.len = i;
break;
}
-
- LM_DBG("Looking for <%.*s>\n",uri.len,uri.s);
+ LM_DBG("Looking for <%.*s>\n",aor.len,aor.s);
get_act_time();