From dd2c197c1d5d5942a65c860997ec1d5793ef249f Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Fri, 19 Aug 2011 14:56:13 +0530 Subject: option validation: further fixes fixes in option handling changes Change-Id: I0a44cdb088e3f08cd43d583a580736d0903fa88c BUG: 3415 Reviewed-on: http://review.gluster.com/261 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- libglusterfs/src/options.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'libglusterfs') diff --git a/libglusterfs/src/options.c b/libglusterfs/src/options.c index 37302e0daec..dee3c91854f 100644 --- a/libglusterfs/src/options.c +++ b/libglusterfs/src/options.c @@ -501,14 +501,13 @@ xlator_option_validate_addr (xlator_t *xl, const char *key, const char *value, if (!valid_internet_address ((char *)value)) { snprintf (errstr, 256, - "internet address '%s' does not conform to standards.", + "internet address '%s' does not conform to standards.", value); gf_log (xl->name, GF_LOG_ERROR, "%s", errstr); + if (op_errstr) + *op_errstr = gf_strdup (errstr); } - if (ret && op_errstr) - *op_errstr = gf_strdup (errstr); - ret = 0; return ret; -- cgit