Module: sip-router
Branch: master
Commit: 219771572b120fe9349170c7f8502b3be1ed22c1
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2197715…
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 847e53b..8b03704 100644
--- a/modules/lcr/lcr_mod.c
+++ b/modules/lcr/lcr_mod.c
@@ -1741,12 +1741,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;