mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 23:08:32 +00:00
Add a massive set of changes for converting to use the ast_debug() macro.
(issue #9957, patches from mvanbaak, caio1982, critch, and dimas) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -829,15 +829,13 @@ static struct ast_config *config_text_file_load(const char *database, const char
|
||||
fflush(stdout);
|
||||
}
|
||||
if (!(f = fopen(fn, "r"))) {
|
||||
if (option_debug)
|
||||
ast_log(LOG_DEBUG, "No file to parse: %s\n", fn);
|
||||
ast_debug(1, "No file to parse: %s\n", fn);
|
||||
if (option_verbose > 1)
|
||||
ast_verbose( "Not found (%s)\n", strerror(errno));
|
||||
continue;
|
||||
}
|
||||
count++;
|
||||
if (option_debug)
|
||||
ast_log(LOG_DEBUG, "Parsing %s\n", fn);
|
||||
ast_debug(1, "Parsing %s\n", fn);
|
||||
if (option_verbose > 1)
|
||||
ast_verbose("Found\n");
|
||||
while (!feof(f)) {
|
||||
@@ -1028,8 +1026,7 @@ int config_text_file_save(const char *configfile, const struct ast_config *cfg,
|
||||
if ((option_verbose > 1) && !option_debug)
|
||||
ast_verbose("Saved\n");
|
||||
} else {
|
||||
if (option_debug)
|
||||
ast_log(LOG_DEBUG, "Unable to open for writing: %s\n", fn);
|
||||
ast_debug(1, "Unable to open for writing: %s\n", fn);
|
||||
if (option_verbose > 1)
|
||||
ast_verbose(VERBOSE_PREFIX_2 "Unable to write (%s)", strerror(errno));
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user