]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
instead of comparing the string pointer to 0, let's compare the value that was actual...
authorKevin P. Fleming <kpfleming@digium.com>
Thu, 30 Oct 2008 16:53:48 +0000 (16:53 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Thu, 30 Oct 2008 16:53:48 +0000 (16:53 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@152811 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/cdr.c

index 3386f87e2f536292914acd1b5612f3db8cb94113..353ff97c8787352e4f597b3e3a2c1e24c0276cd7 100644 (file)
@@ -1395,7 +1395,7 @@ static int do_reload(void)
                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;
@@ -1403,7 +1403,7 @@ static int do_reload(void)
                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;