Module: sip-router
Branch: sr_3.0
Commit: 0c819f3ff3d947897fa0bafbaaa0081b671bb4e4
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0c819f3…
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.
---
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;