Module: sip-router
Branch: tmp/k3.0_sr_backports
Commit: c3299d26c0f035b9fd4755a6854b9fe97fb4454e
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c3299d2…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Mon Jan 18 15:43:32 2010 +0100
registrar(k): preserve old bflags upon lookup
- lookup was resetting bflags value with what was retrieved from
location table
- preserve now bflags set in config before
- reported by Ricardo Martinez
(cherry picked from commit e6eceeb8ccce8b37d09f5f69cafb97e007467d78)
---
modules_k/registrar/lookup.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/modules_k/registrar/lookup.c b/modules_k/registrar/lookup.c
index 2db8ee7..67accc7 100644
--- a/modules_k/registrar/lookup.c
+++ b/modules_k/registrar/lookup.c
@@ -65,6 +65,8 @@ int lookup(struct sip_msg* _m, char* _t, char* _s)
int res;
int ret;
str path_dst;
+ flag_t old_bflags;
+
if (_m->new_uri.s) uri = _m->new_uri;
else uri = _m->first_line.u.request.uri;
@@ -131,7 +133,9 @@ int lookup(struct sip_msg* _m, char* _t, char* _s)
set_ruri_q(ptr->q);
- setbflagsval( 0, ptr->cflags);
+ old_bflags = 0;
+ getbflagsval(0, &old_bflags);
+ setbflagsval(0, old_bflags|ptr->cflags);
if (ptr->sock)
set_force_socket(_m, ptr->sock);