Module: kamailio
Branch: master
Commit: 0ec36aeacb30eafbbee36a7a8cc4254d0ca8a384
URL:
https://github.com/kamailio/kamailio/commit/0ec36aeacb30eafbbee36a7a8cc4254…
Author: Jason Penton <jason.penton(a)gmail.com>
Committer: Jason Penton <jason.penton(a)gmail.com>
Date: 2015-02-20T15:23:45+02:00
modules/ims_registrar_pcscf: lookup of contact should not be based on where request comes
from
---
Modified: modules/ims_registrar_pcscf/lookup.c
---
Diff:
https://github.com/kamailio/kamailio/commit/0ec36aeacb30eafbbee36a7a8cc4254…
Patch:
https://github.com/kamailio/kamailio/commit/0ec36aeacb30eafbbee36a7a8cc4254…
---
diff --git a/modules/ims_registrar_pcscf/lookup.c b/modules/ims_registrar_pcscf/lookup.c
index 7ace378..b0f7ae2 100644
--- a/modules/ims_registrar_pcscf/lookup.c
+++ b/modules/ims_registrar_pcscf/lookup.c
@@ -59,17 +59,13 @@ int lookup_transport(struct sip_msg* _m, udomain_t* _d, str* _uri) {
str uri;
pcontact_t* pcontact;
char tmp[MAX_URI_SIZE];
- char srcip[20];
- str received_host;
+ str received_host = {0,0};
str tmp_s;
int ret = 1;
if (_m->new_uri.s) uri = _m->new_uri;
else uri = _m->first_line.u.request.uri;
- received_host.len = ip_addr2sbuf(&_m->rcv.src_ip, srcip, sizeof(srcip));
- received_host.s = srcip;
-
//now lookup in usrloc
ul.lock_udomain(_d, &uri, &received_host, _m->rcv.src_port);
if (ul.get_pcontact(_d, &uri, &received_host, _m->rcv.src_port,
&pcontact) != 0) { //need to insert new contact