From b301579e518c645b52203f099c7953105fc7ebda Mon Sep 17 00:00:00 2001 From: kpfleming Date: Thu, 30 Oct 2008 16:54:54 +0000 Subject: Merged revisions 152812 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r152812 | kpfleming | 2008-10-30 11:54:29 -0500 (Thu, 30 Oct 2008) | 9 lines Merged revisions 152811 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r152811 | kpfleming | 2008-10-30 11:53:48 -0500 (Thu, 30 Oct 2008) | 3 lines instead of comparing the string pointer to 0, let's compare the value that was actually parsed out of the string (found by sparse) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@152813 f38db490-d61c-443f-a65b-d21fe96a405b --- main/cdr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/cdr.c b/main/cdr.c index d66ec767a..5be9d5243 100644 --- a/main/cdr.c +++ b/main/cdr.c @@ -1406,7 +1406,7 @@ static int do_reload(int reload) if ((size_value = ast_variable_retrieve(config, "general", "size"))) { if (sscanf(size_value, "%d", &cfg_size) < 1) ast_log(LOG_WARNING, "Unable to convert '%s' to a numeric value.\n", size_value); - else if (size_value < 0) + else if (cfg_size < 0) ast_log(LOG_WARNING, "Invalid maximum batch size '%d' specified, using default\n", cfg_size); else batchsize = cfg_size; @@ -1414,7 +1414,7 @@ static int do_reload(int reload) if ((time_value = ast_variable_retrieve(config, "general", "time"))) { if (sscanf(time_value, "%d", &cfg_time) < 1) ast_log(LOG_WARNING, "Unable to convert '%s' to a numeric value.\n", time_value); - else if (time_value < 0) + else if (cfg_time < 0) ast_log(LOG_WARNING, "Invalid maximum batch time '%d' specified, using default\n", cfg_time); else batchtime = cfg_time; -- cgit v1.2.3