From 0c0d038d14ba0c34010e9029e7d87d3854591c53 Mon Sep 17 00:00:00 2001 From: Tom Early Date: Fri, 10 Feb 2017 12:24:32 -0500 Subject: [PATCH] fixed a bug and returned values in read_config() --- g2_link.cpp | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/g2_link.cpp b/g2_link.cpp index dad202c..6535bbc 100644 --- a/g2_link.cpp +++ b/g2_link.cpp @@ -841,11 +841,11 @@ static bool read_config(char *cfgFile) } catch(const FileIOException &fioex) { traceit("Can't read %s\n", cfgFile); - return 1; + return false; } catch(const ParseException &pex) { traceit("Parse error at %s:%d - %s\n", pex.getFile(), pex.getLine(), pex.getError()); - return 1; + return false; } std::string value; @@ -854,7 +854,7 @@ static bool read_config(char *cfgFile) int l = login_call.length(); if (l<3 || l>CALL_SIZE-2) { traceit("Call '%s' is invalid length!\n", login_call.c_str()); - return 1; + return false; } else { for (i=0; i