[sr-dev] git:pd/msrp: modules/lcr: treat lcr_gw/ ip_addr empty string value same as null value
Peter Dunkley
peter.dunkley at crocodile-rcs.com
Wed Feb 6 14:51:41 CET 2013
Module: sip-router
Branch: pd/msrp
Commit: 1e16eb9c892358a972ae71f05ec138fbe0d23126
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1e16eb9c892358a972ae71f05ec138fbe0d23126
Author: Juha Heinanen <jh at tutpro.com>
Committer: Juha Heinanen <jh at 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;
More information about the sr-dev
mailing list