summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2011-11-30 23:38:34 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2011-11-30 23:38:34 +0000
commit56b21b46834f42b6d1dd4c1d1dd0c4aa883d56aa (patch)
tree1b920bae618544ac76057823bef4c928ba4f7f6b /main
parent3106f64eac5322efdd9f81594d788de4631b938a (diff)
Remove the few places where we try to ast_verbose() without a newline.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r--main/config.c23
-rw-r--r--main/loader.c7
-rw-r--r--main/tcptls.c6
3 files changed, 19 insertions, 17 deletions
diff --git a/main/config.c b/main/config.c
index e76a43fc4..9c0f73ac9 100644
--- a/main/config.c
+++ b/main/config.c
@@ -1503,18 +1503,16 @@ static struct ast_config *config_text_file_load(const char *database, const char
if (cfmtime)
cfmtime->mtime = statbuf.st_mtime;
- ast_verb(2, "Parsing '%s': ", fn);
- fflush(stdout);
if (!(f = fopen(fn, "r"))) {
ast_debug(1, "No file to parse: %s\n", fn);
- ast_verb(2, "Not found (%s)\n", strerror(errno));
+ ast_verb(2, "Parsing '%s': Not found (%s)\n", fn, strerror(errno));
continue;
}
count++;
/* If we get to this point, then we're loading regardless */
ast_clear_flag(&flags, CONFIG_FLAG_FILEUNCHANGED);
ast_debug(1, "Parsing %s\n", fn);
- ast_verb(2, "Found\n");
+ ast_verb(2, "Parsing '%s': Found\n", fn);
while (!feof(f)) {
lineno++;
if (fgets(buf, sizeof(buf), f)) {
@@ -1839,7 +1837,7 @@ int ast_config_text_file_save(const char *configfile, const struct ast_config *c
fclose(f); /* this should zero out the file */
} else {
ast_debug(1, "Unable to open for writing: %s\n", fn);
- ast_verb(2, "Unable to write %s (%s)", fn, strerror(errno));
+ ast_verb(2, "Unable to write %s (%s)\n", fn, strerror(errno));
}
if (fi) {
ao2_ref(fi, -1);
@@ -1856,7 +1854,7 @@ int ast_config_text_file_save(const char *configfile, const struct ast_config *c
(f = fopen(fn, "w"))
#endif
) {
- ast_verb(2, "Saving '%s': ", fn);
+ ast_verb(2, "Saving '%s'\n", fn);
gen_header(f, configfile, fn, generator);
cat = cfg->root;
fclose(f);
@@ -1873,7 +1871,7 @@ int ast_config_text_file_save(const char *configfile, const struct ast_config *c
f = fopen(fn, "a");
if (!f) {
ast_debug(1, "Unable to open for writing: %s\n", fn);
- ast_verb(2, "Unable to write %s (%s)", fn, strerror(errno));
+ ast_verb(2, "Unable to write %s (%s)\n", fn, strerror(errno));
if (fi) {
ao2_ref(fi, -1);
}
@@ -1964,7 +1962,7 @@ int ast_config_text_file_save(const char *configfile, const struct ast_config *c
f = fopen(fn, "a");
if (!f) {
ast_debug(1, "Unable to open for writing: %s\n", fn);
- ast_verb(2, "Unable to write %s (%s)", fn, strerror(errno));
+ ast_verb(2, "Unable to write %s (%s)\n", fn, strerror(errno));
if (fi) {
ao2_ref(fi, -1);
}
@@ -2013,11 +2011,12 @@ int ast_config_text_file_save(const char *configfile, const struct ast_config *c
}
cat = cat->next;
}
- if (!option_debug)
- ast_verb(2, "Saved\n");
+ if (!option_debug) {
+ ast_verb(2, "Saving '%s': saved\n", fn);
+ }
} else {
ast_debug(1, "Unable to open for writing: %s\n", fn);
- ast_verb(2, "Unable to write (%s)", strerror(errno));
+ ast_verb(2, "Unable to write '%s' (%s)\n", fn, strerror(errno));
if (fi) {
ao2_ref(fi, -1);
}
@@ -2034,7 +2033,7 @@ int ast_config_text_file_save(const char *configfile, const struct ast_config *c
f = fopen(fn, "a");
if (!f) {
ast_debug(1, "Unable to open for writing: %s\n", fn);
- ast_verb(2, "Unable to write %s (%s)", fn, strerror(errno));
+ ast_verb(2, "Unable to write %s (%s)\n", fn, strerror(errno));
if (fi) {
ao2_ref(fi, -1);
}
diff --git a/main/loader.c b/main/loader.c
index 6cd5ffbdb..f9b2de943 100644
--- a/main/loader.c
+++ b/main/loader.c
@@ -797,8 +797,11 @@ static enum ast_module_load_result start_resource(struct ast_module *mod)
case AST_MODULE_LOAD_SUCCESS:
if (!ast_fully_booted) {
ast_verb(1, "%s => (%s)\n", mod->resource, term_color(tmp, mod->info->description, COLOR_BROWN, COLOR_BLACK, sizeof(tmp)));
- if (ast_opt_console && !option_verbose)
- ast_verbose( ".");
+ if (ast_opt_console && !option_verbose) {
+ /* This never looks good on anything but the root console, so
+ * it's best not to try to funnel it through the logger. */
+ fprintf(stdout, ".");
+ }
} else {
ast_verb(1, "Loaded %s => (%s)\n", mod->resource, mod->info->description);
}
diff --git a/main/tcptls.c b/main/tcptls.c
index ae30e95e1..8210839c0 100644
--- a/main/tcptls.c
+++ b/main/tcptls.c
@@ -359,7 +359,7 @@ static int __ssl_setup(struct ast_tls_config *cfg, int client)
if (SSL_CTX_use_certificate_file(cfg->ssl_ctx, cfg->certfile, SSL_FILETYPE_PEM) == 0) {
if (!client) {
/* Clients don't need a certificate, but if its setup we can use it */
- ast_verb(0, "SSL error loading cert file. <%s>", cfg->certfile);
+ ast_verb(0, "SSL error loading cert file. <%s>\n", cfg->certfile);
sleep(2);
cfg->enabled = 0;
return 0;
@@ -368,7 +368,7 @@ static int __ssl_setup(struct ast_tls_config *cfg, int client)
if ((SSL_CTX_use_PrivateKey_file(cfg->ssl_ctx, tmpprivate, SSL_FILETYPE_PEM) == 0) || (SSL_CTX_check_private_key(cfg->ssl_ctx) == 0 )) {
if (!client) {
/* Clients don't need a private key, but if its setup we can use it */
- ast_verb(0, "SSL error loading private key file. <%s>", tmpprivate);
+ ast_verb(0, "SSL error loading private key file. <%s>\n", tmpprivate);
sleep(2);
cfg->enabled = 0;
return 0;
@@ -378,7 +378,7 @@ static int __ssl_setup(struct ast_tls_config *cfg, int client)
if (!ast_strlen_zero(cfg->cipher)) {
if (SSL_CTX_set_cipher_list(cfg->ssl_ctx, cfg->cipher) == 0 ) {
if (!client) {
- ast_verb(0, "SSL cipher error <%s>", cfg->cipher);
+ ast_verb(0, "SSL cipher error <%s>\n", cfg->cipher);
sleep(2);
cfg->enabled = 0;
return 0;