Module: sip-router
Branch: kamailio_3.0
Commit: 2da81aa4f591f0dfef49cd6acabd19baa7b2dd8d
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2da81aa…
Author: Juha Heinanen <jh(a)tutpro.com>
Committer: Juha Heinanen <jh(a)tutpro.com>
Date: Wed Apr 14 17:17:59 2010 +0300
modules/lcr: always use current time when loading gateways
- Always use current time when deciding if a gateway is defunct or not.
Otherwise a gateway may get used even if its defunct until time in
database is greater than current time.
(cherry picked from commit 0c819f3ff3d947897fa0bafbaaa0081b671bb4e4)
---
modules/lcr/lcr_mod.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/modules/lcr/lcr_mod.c b/modules/lcr/lcr_mod.c
index 9748024..65c65d1 100644
--- a/modules/lcr/lcr_mod.c
+++ b/modules/lcr/lcr_mod.c
@@ -1746,12 +1746,11 @@ static int load_gws(struct sip_msg* _m, char *_lcr_id, char
*_from_uri)
gw_count = gws[0].ip_addr;
if (defunct_capability > 0) {
- now = time((time_t *)NULL);
delete_avp(defunct_gw_avp_type, defunct_gw_avp);
- } else {
- now = MAX_UVAR_VALUE(now);
}
+ now = time((time_t *)NULL);
+
while (pl) {
if (ruri_user.len < pl->prefix_len) {
pl = pl->next;