forgotten to Cc the list ...
-------- Original-Nachricht --------
Betreff: Re: [sr-dev] git:kamailio_3.0: registrar(k): preserve old
bflags upon lookup
Datum: Mon, 18 Jan 2010 16:30:03 +0100
Von: Klaus Darilion <klaus.mailinglists(a)pernau.at>
An: Daniel-Constantin Mierla <miconda(a)gmail.com>
Referenzen: <20100118144554.BD54CEF8070@rimmer>
Daniel-Constantin Mierla schrieb:
Module: sip-router
Branch: kamailio_3.0
Commit: e6eceeb8ccce8b37d09f5f69cafb97e007467d78
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e6eceeb…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
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
shouldn't them be overwritten by lookup()? I thought lookup will restore
the same bflags as just before save()?
klaus
---
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);
_______________________________________________
sr-dev mailing list
sr-dev(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev