From 4f65179a8f90547498b00caf48eaad618098ae70 Mon Sep 17 00:00:00 2001 From: Humble Devassy Chirammal Date: Wed, 25 Feb 2015 17:10:12 +0530 Subject: afr: catch proper result of glfs_set_volfile_server Change-Id: I5a1db7b88c33bf5faa7a8848502357b052a799f4 BUG: 1194640 Signed-off-by: Humble Devassy Chirammal Reviewed-on: http://review.gluster.org/9746 Tested-by: Gluster Build System Reviewed-by: Ravishankar N Reviewed-by: Pranith Kumar Karampuri Tested-by: Pranith Kumar Karampuri --- heal/src/glfs-heal.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/heal/src/glfs-heal.c b/heal/src/glfs-heal.c index 7e8673a65ac..b32002a1a74 100644 --- a/heal/src/glfs-heal.c +++ b/heal/src/glfs-heal.c @@ -736,12 +736,15 @@ main (int argc, char **argv) } ret = glfs_set_volfile_server (fs, "tcp", "localhost", 24007); + if (ret) { + printf("Setting the volfile server failed, %s\n", strerror (errno)); + goto out; + } snprintf (logfilepath, sizeof (logfilepath), DEFAULT_HEAL_LOG_FILE_DIRECTORY"/glfsheal-%s.log", volname); ret = glfs_set_logging(fs, logfilepath, GF_LOG_INFO); if (ret < 0) { - ret = -1; - printf ("Not able to initialize volume '%s'\n", volname); + printf ("Failed to set the log file path, %s\n", strerror (errno)); goto out; } -- cgit