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
certified/11.2
Tilghman Lesher 14 years ago
parent 3106f64eac
commit 56b21b4683

@ -7372,16 +7372,23 @@ static struct ast_frame *sip_rtp_read(struct ast_channel *ast, struct sip_pvt *p
case 4: case 4:
f = ast_rtp_instance_read(p->trtp, 0); /* RTP Text */ f = ast_rtp_instance_read(p->trtp, 0); /* RTP Text */
if (sipdebug_text) { if (sipdebug_text) {
struct ast_str *out = ast_str_create(f->datalen * 4 + 6);
int i; int i;
unsigned char* arr = f->data.ptr; unsigned char* arr = f->data.ptr;
for (i=0; i < f->datalen; i++) { do {
ast_verbose("%c", (arr[i] > ' ' && arr[i] < '}') ? arr[i] : '.'); if (!out) {
} break;
ast_verbose(" -> "); }
for (i=0; i < f->datalen; i++) { for (i = 0; i < f->datalen; i++) {
ast_verbose("%02X ", arr[i]); ast_str_append(&out, 0, "%c", (arr[i] > ' ' && arr[i] < '}') ? arr[i] : '.');
} }
ast_verbose("\n"); ast_str_append(&out, 0, " -> ");
for (i = 0; i < f->datalen; i++) {
ast_str_append(&out, 0, "%02X ", arr[i]);
}
ast_verb(0, "%s\n", ast_str_buffer(out));
ast_free(out);
} while (0);
} }
break; break;
case 5: case 5:

@ -1558,14 +1558,14 @@ static void rcv_mac_addr(struct unistimsession *pte, const unsigned char *buf)
int tmp, i = 0; int tmp, i = 0;
char addrmac[19]; char addrmac[19];
int res = 0; int res = 0;
if (unistimdebug)
ast_verb(0, "Mac Address received : ");
for (tmp = 15; tmp < 15 + SIZE_HEADER; tmp++) { for (tmp = 15; tmp < 15 + SIZE_HEADER; tmp++) {
sprintf(&addrmac[i], "%.2x", (unsigned char) buf[tmp]); sprintf(&addrmac[i], "%.2x", (unsigned char) buf[tmp]);
i += 2; i += 2;
} }
if (unistimdebug) if (unistimdebug) {
ast_verb(0, "%s\n", addrmac); ast_verb(0, "Mac Address received : %s\n", addrmac);
}
strcpy(pte->macaddr, addrmac); strcpy(pte->macaddr, addrmac);
res = unistim_register(pte); res = unistim_register(pte);
if (!res) { if (!res) {

@ -1503,18 +1503,16 @@ static struct ast_config *config_text_file_load(const char *database, const char
if (cfmtime) if (cfmtime)
cfmtime->mtime = statbuf.st_mtime; cfmtime->mtime = statbuf.st_mtime;
ast_verb(2, "Parsing '%s': ", fn);
fflush(stdout);
if (!(f = fopen(fn, "r"))) { if (!(f = fopen(fn, "r"))) {
ast_debug(1, "No file to parse: %s\n", fn); 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; continue;
} }
count++; count++;
/* If we get to this point, then we're loading regardless */ /* If we get to this point, then we're loading regardless */
ast_clear_flag(&flags, CONFIG_FLAG_FILEUNCHANGED); ast_clear_flag(&flags, CONFIG_FLAG_FILEUNCHANGED);
ast_debug(1, "Parsing %s\n", fn); ast_debug(1, "Parsing %s\n", fn);
ast_verb(2, "Found\n"); ast_verb(2, "Parsing '%s': Found\n", fn);
while (!feof(f)) { while (!feof(f)) {
lineno++; lineno++;
if (fgets(buf, sizeof(buf), f)) { 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 */ fclose(f); /* this should zero out the file */
} else { } else {
ast_debug(1, "Unable to open for writing: %s\n", fn); 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) { if (fi) {
ao2_ref(fi, -1); 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")) (f = fopen(fn, "w"))
#endif #endif
) { ) {
ast_verb(2, "Saving '%s': ", fn); ast_verb(2, "Saving '%s'\n", fn);
gen_header(f, configfile, fn, generator); gen_header(f, configfile, fn, generator);
cat = cfg->root; cat = cfg->root;
fclose(f); fclose(f);
@ -1873,7 +1871,7 @@ int ast_config_text_file_save(const char *configfile, const struct ast_config *c
f = fopen(fn, "a"); f = fopen(fn, "a");
if (!f) { if (!f) {
ast_debug(1, "Unable to open for writing: %s\n", fn); 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) { if (fi) {
ao2_ref(fi, -1); 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"); f = fopen(fn, "a");
if (!f) { if (!f) {
ast_debug(1, "Unable to open for writing: %s\n", fn); 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) { if (fi) {
ao2_ref(fi, -1); 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; cat = cat->next;
} }
if (!option_debug) if (!option_debug) {
ast_verb(2, "Saved\n"); ast_verb(2, "Saving '%s': saved\n", fn);
}
} else { } else {
ast_debug(1, "Unable to open for writing: %s\n", fn); 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) { if (fi) {
ao2_ref(fi, -1); 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"); f = fopen(fn, "a");
if (!f) { if (!f) {
ast_debug(1, "Unable to open for writing: %s\n", fn); 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) { if (fi) {
ao2_ref(fi, -1); ao2_ref(fi, -1);
} }

@ -797,8 +797,11 @@ static enum ast_module_load_result start_resource(struct ast_module *mod)
case AST_MODULE_LOAD_SUCCESS: case AST_MODULE_LOAD_SUCCESS:
if (!ast_fully_booted) { if (!ast_fully_booted) {
ast_verb(1, "%s => (%s)\n", mod->resource, term_color(tmp, mod->info->description, COLOR_BROWN, COLOR_BLACK, sizeof(tmp))); 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) if (ast_opt_console && !option_verbose) {
ast_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 { } else {
ast_verb(1, "Loaded %s => (%s)\n", mod->resource, mod->info->description); ast_verb(1, "Loaded %s => (%s)\n", mod->resource, mod->info->description);
} }

@ -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 (SSL_CTX_use_certificate_file(cfg->ssl_ctx, cfg->certfile, SSL_FILETYPE_PEM) == 0) {
if (!client) { if (!client) {
/* Clients don't need a certificate, but if its setup we can use it */ /* 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); sleep(2);
cfg->enabled = 0; cfg->enabled = 0;
return 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 ((SSL_CTX_use_PrivateKey_file(cfg->ssl_ctx, tmpprivate, SSL_FILETYPE_PEM) == 0) || (SSL_CTX_check_private_key(cfg->ssl_ctx) == 0 )) {
if (!client) { if (!client) {
/* Clients don't need a private key, but if its setup we can use it */ /* 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); sleep(2);
cfg->enabled = 0; cfg->enabled = 0;
return 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 (!ast_strlen_zero(cfg->cipher)) {
if (SSL_CTX_set_cipher_list(cfg->ssl_ctx, cfg->cipher) == 0 ) { if (SSL_CTX_set_cipher_list(cfg->ssl_ctx, cfg->cipher) == 0 ) {
if (!client) { if (!client) {
ast_verb(0, "SSL cipher error <%s>", cfg->cipher); ast_verb(0, "SSL cipher error <%s>\n", cfg->cipher);
sleep(2); sleep(2);
cfg->enabled = 0; cfg->enabled = 0;
return 0; return 0;

Loading…
Cancel
Save