Browse code

modules/ims_registrar_pcscf: lookup of contact should not be based on where request comes from

Jason Penton authored on 20/02/2015 13:23:45
Showing 1 changed files
... ...
@@ -59,17 +59,13 @@ int lookup_transport(struct sip_msg* _m, udomain_t* _d, str* _uri) {
59 59
     str uri;
60 60
     pcontact_t* pcontact;
61 61
     char tmp[MAX_URI_SIZE];
62
-    char srcip[20];
63
-    str received_host;
62
+    str received_host = {0,0};
64 63
     str tmp_s;
65 64
     int ret = 1;
66 65
 
67 66
     if (_m->new_uri.s) uri = _m->new_uri;
68 67
     else uri = _m->first_line.u.request.uri;
69 68
 
70
-    received_host.len = ip_addr2sbuf(&_m->rcv.src_ip, srcip, sizeof(srcip));
71
-    received_host.s = srcip;
72
-    
73 69
     //now lookup in usrloc
74 70
     ul.lock_udomain(_d, &uri, &received_host, _m->rcv.src_port);
75 71
     if (ul.get_pcontact(_d, &uri, &received_host, _m->rcv.src_port, &pcontact) != 0) { //need to insert new contact