Module: sip-router
Branch: master
Commit: b21b5125c7c60775226a7a86dc411863477ed799
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b21b512…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Mon Dec 24 10:04:15 2012 +0100
registrar(k): restore the location contact xavp upon lookup
---
modules_k/registrar/lookup.c | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/modules_k/registrar/lookup.c b/modules_k/registrar/lookup.c
index e3553db..91ccb8e 100644
--- a/modules_k/registrar/lookup.c
+++ b/modules_k/registrar/lookup.c
@@ -266,8 +266,8 @@ int lookup(struct sip_msg* _m, udomain_t* _d, str* _uri)
if (ptr->instance.len) {
if (set_instance(_m, &(ptr->instance)) < 0) {
- ret = -3;
- goto done;
+ ret = -3;
+ goto done;
}
}
@@ -282,6 +282,13 @@ int lookup(struct sip_msg* _m, udomain_t* _d, str* _uri)
if (ptr->sock)
set_force_socket(_m, ptr->sock);
+ if(ptr->xavp!=NULL) {
+ xavp = xavp_clone_level_nodata(ptr->xavp);
+ if(xavp_add(xavp, NULL)<0) {
+ ret = -3;
+ goto done;
+ }
+ }
ptr = ptr->next;
}
@@ -315,6 +322,13 @@ int lookup(struct sip_msg* _m, udomain_t* _d, str* _uri)
/* Also give a chance to the next branches*/
continue;
}
+ if(ptr->xavp!=NULL) {
+ xavp = xavp_clone_level_nodata(ptr->xavp);
+ if(xavp_insert(xavp, nr_branches, NULL)<0) {
+ ret = -3;
+ goto done;
+ }
+ }
}
}