[sr-dev] git:master: ims_usrloc_pcscf: fixed bug where contact pointer is not bumped in continue sections of loops
Jason Penton
jason.penton at gmail.com
Wed Apr 2 18:07:17 CEST 2014
Module: sip-router
Branch: master
Commit: 8598b812f59b37d7f4b7469aa1a7f61b93ece2a7
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8598b812f59b37d7f4b7469aa1a7f61b93ece2a7
Author: Jason Penton <jason.penton at gmail.com>
Committer: Jason Penton <jason.penton at gmail.com>
Date: Wed Apr 2 18:06:15 2014 +0200
ims_usrloc_pcscf: fixed bug where contact pointer is not bumped in continue sections of loops
---
modules/ims_usrloc_pcscf/udomain.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/modules/ims_usrloc_pcscf/udomain.c b/modules/ims_usrloc_pcscf/udomain.c
index c78b54d..dd6ec4d 100644
--- a/modules/ims_usrloc_pcscf/udomain.c
+++ b/modules/ims_usrloc_pcscf/udomain.c
@@ -482,6 +482,7 @@ int get_pcontact(udomain_t* _d, str* _contact, struct pcontact** _c) {
/* hosts HAVE to match */
if ((needle_uri.host.len != c->received_host.len) || (memcmp(needle_uri.host.s, c->contact_host.s, needle_uri.host.len)!=0)) {
//can't possibly match
+ c = c->next;
continue;
}
@@ -533,8 +534,10 @@ int get_pcontact(udomain_t* _d, str* _contact, struct pcontact** _c) {
port_match = 1;
}
- if (!port_match)
+ if (!port_match){
+ c = c->next;
continue;
+ }
/* user parts must match (if not wildcarded) with either primary contact OR with any userpart in the implicit set (associated URIs).. */
if (((needle_uri.user.len == 1)
@@ -551,6 +554,7 @@ int get_pcontact(udomain_t* _d, str* _contact, struct pcontact** _c) {
while (impu) {
if (parse_uri(impu->public_identity.s, impu->public_identity.len, &impu_uri) != 0) {
LM_ERR("failed to parse IMPU URI [%.*s]...continuing\n", impu->public_identity.len, impu->public_identity.s);
+ impu = impu->next;
continue;
}
LM_DBG("comparing first %d chars of impu [%.*s] for contact userpart [%.*s]\n",
More information about the sr-dev
mailing list