Module: sip-router
Branch: master
Commit: 1e16eb9c892358a972ae71f05ec138fbe0d23126
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1e16eb9…
Author: Juha Heinanen <jh(a)tutpro.com>
Committer: Juha Heinanen <jh(a)tutpro.com>
Date: Wed Feb 6 11:21:11 2013 +0200
modules/lcr: treat lcr_gw/ip_addr empty string value same as null value
---
modules/lcr/lcr_mod.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/modules/lcr/lcr_mod.c b/modules/lcr/lcr_mod.c
index 757734d..9c5ff3f 100644
--- a/modules/lcr/lcr_mod.c
+++ b/modules/lcr/lcr_mod.c
@@ -943,7 +943,8 @@ static int insert_gws(db1_res_t *res, struct gw_info *gws,
i);
return 0;
}
- if (VAL_NULL(ROW_VALUES(row) + 1)) {
+ if (VAL_NULL(ROW_VALUES(row) + 1) ||
+ (strlen((char *)VAL_STRING(ROW_VALUES(row) + 1)) == 0)) {
ip_string.s = (char *)0;
ip_addr.af = 0;
ip_addr.len = 0;