aboutsummaryrefslogtreecommitdiffstats
path: root/main/say.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-24 18:51:41 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-24 18:51:41 +0000
commit438cb82e0f7387fd29396ac0037c9c574f7dd114 (patch)
treea48442a34e74ae91b6f1a3c6a9ebef7d943024c1 /main/say.c
parente645e3fc7bcc93bdd42d2296ed0709e72096c3b6 (diff)
Conversions to ast_debug()
(issue #9984, patches from eliel and dimas) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@71338 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/say.c')
-rw-r--r--main/say.c90
1 files changed, 30 insertions, 60 deletions
diff --git a/main/say.c b/main/say.c
index c11ac7218..7dce69a5c 100644
--- a/main/say.c
+++ b/main/say.c
@@ -508,8 +508,7 @@ static int ast_say_number_full_en(struct ast_channel *chan, int num, const char
num = num % 1000000;
snprintf(fn, sizeof(fn), "digits/million");
} else {
- if (option_debug)
- ast_log(LOG_DEBUG, "Number '%d' is too big for me\n", num);
+ ast_debug(1, "Number '%d' is too big for me\n", num);
res = -1;
}
}
@@ -738,8 +737,7 @@ static int ast_say_number_full_da(struct ast_channel *chan, int num, const char
snprintf(fn, sizeof(fn), "digits/millions");
num = num % 1000000;
} else {
- if (option_debug)
- ast_log(LOG_DEBUG, "Number '%d' is too big for me\n", num);
+ ast_debug(1, "Number '%d' is too big for me\n", num);
res = -1;
}
}
@@ -874,8 +872,7 @@ static int ast_say_number_full_de(struct ast_channel *chan, int num, const char
snprintf(fn, sizeof(fn), "digits/milliards");
}
} else {
- if (option_debug)
- ast_log(LOG_DEBUG, "Number '%d' is too big for me\n", num);
+ ast_debug(1, "Number '%d' is too big for me\n", num);
res = -1;
}
if (!res) {
@@ -960,8 +957,7 @@ static int ast_say_number_full_en_GB(struct ast_channel *chan, int num, const ch
if (num && num < 100)
playa++;
} else {
- if (option_debug)
- ast_log(LOG_DEBUG, "Number '%d' is too big for me\n", num);
+ ast_debug(1, "Number '%d' is too big for me\n", num);
res = -1;
}
@@ -1062,8 +1058,7 @@ static int ast_say_number_full_es(struct ast_channel *chan, int num, const char
}
num = num % 1000000;
} else {
- if (option_debug)
- ast_log(LOG_DEBUG, "Number '%d' is too big for me\n", num);
+ ast_debug(1, "Number '%d' is too big for me\n", num);
res = -1;
}
}
@@ -1159,8 +1154,7 @@ static int ast_say_number_full_fr(struct ast_channel *chan, int num, const char
snprintf(fn, sizeof(fn), "digits/million");
num = num % 1000000;
} else {
- if (option_debug)
- ast_log(LOG_DEBUG, "Number '%d' is too big for me\n", num);
+ ast_debug(1, "Number '%d' is too big for me\n", num);
res = -1;
}
if (!res) {
@@ -1309,8 +1303,7 @@ static int ast_say_number_full_he(struct ast_channel *chan, int num,
snprintf(fn, sizeof(fn), "digits/million");
num = num % 1000000;
} else {
- if (option_debug)
- ast_log(LOG_DEBUG, "Number '%d' is too big for me\n", num);
+ ast_debug(1, "Number '%d' is too big for me\n", num);
res = -1;
}
if (!res) {
@@ -1541,8 +1534,7 @@ static int ast_say_number_full_it(struct ast_channel *chan, int num, const char
else
snprintf(fn, sizeof(fn), "digits/millions");
} else {
- if (option_debug)
- ast_log(LOG_DEBUG, "Number '%d' is too big for me\n", num);
+ ast_debug(1, "Number '%d' is too big for me\n", num);
res = -1;
}
}
@@ -1618,8 +1610,7 @@ static int ast_say_number_full_nl(struct ast_channel *chan, int num, const char
num = num % 1000000;
snprintf(fn, sizeof(fn), "digits/million");
} else {
- if (option_debug)
- ast_log(LOG_DEBUG, "Number '%d' is too big for me\n", num);
+ ast_debug(1, "Number '%d' is too big for me\n", num);
res = -1;
}
}
@@ -1714,8 +1705,7 @@ static int ast_say_number_full_no(struct ast_channel *chan, int num, const char
if (num && num < 100)
playa++;
} else {
- if (option_debug)
- ast_log(LOG_DEBUG, "Number '%d' is too big for me\n", num);
+ ast_debug(1, "Number '%d' is too big for me\n", num);
res = -1;
}
@@ -1766,8 +1756,7 @@ static void pl_odtworz_plik(struct ast_channel *chan, const char *language, int
{
char file_name[255] = "digits/";
strcat(file_name, fn);
- if (option_debug)
- ast_log(LOG_DEBUG, "Trying to play: %s\n", file_name);
+ ast_debug(1, "Trying to play: %s\n", file_name);
if (!ast_streamfile(chan, file_name, language)) {
if ((audiofd > -1) && (ctrlfd > -1))
ast_waitstream_full(chan, ints, audiofd, ctrlfd);
@@ -2180,8 +2169,7 @@ static int ast_say_number_full_se(struct ast_channel *chan, int num, const char
num = num % 1000000;
snprintf(fn, sizeof(fn), "digits/million");
} else {
- if (option_debug)
- ast_log(LOG_DEBUG, "Number '%d' is too big for me\n", num);
+ ast_debug(1, "Number '%d' is too big for me\n", num);
res = -1;
}
}
@@ -2246,8 +2234,7 @@ static int ast_say_number_full_tw(struct ast_channel *chan, int num, const char
num = num % 1000000;
snprintf(fn, sizeof(fn), "digits/million");
} else {
- if (option_debug)
- ast_log(LOG_DEBUG, "Number '%d' is too big for me\n", num);
+ ast_debug(1, "Number '%d' is too big for me\n", num);
res = -1;
}
}
@@ -2356,8 +2343,7 @@ static int ast_say_number_full_ru(struct ast_channel *chan, int num, const char
}
num %= 1000000;
} else {
- if (option_debug)
- ast_log(LOG_DEBUG, "Number '%d' is too big for me\n", num);
+ ast_debug(1, "Number '%d' is too big for me\n", num);
res = -1;
}
if (!res) {
@@ -2471,8 +2457,7 @@ static int ast_say_enumeration_full_en(struct ast_channel *chan, int num, const
snprintf(fn, sizeof(fn), "digits/h-last");
num = 0;
} else {
- if (option_debug)
- ast_log(LOG_DEBUG, "Number '%d' is too big for me\n", num);
+ ast_debug(1, "Number '%d' is too big for me\n", num);
res = -1;
}
@@ -2625,8 +2610,7 @@ static int ast_say_enumeration_full_da(struct ast_channel *chan, int num, const
snprintf(fn, sizeof(fn), "digits/h-last%s", gender);
num = 0;
} else {
- if (option_debug)
- ast_log(LOG_DEBUG, "Number '%d' is too big for me\n", num);
+ ast_debug(1, "Number '%d' is too big for me\n", num);
res = -1;
}
@@ -2789,8 +2773,7 @@ static int ast_say_enumeration_full_de(struct ast_channel *chan, int num, const
snprintf(fn, sizeof(fn), "digits/h-last%s", gender);
num = 0;
} else {
- if (option_debug)
- ast_log(LOG_DEBUG, "Number '%d' is too big for me\n", num);
+ ast_debug(1, "Number '%d' is too big for me\n", num);
res = -1;
}
@@ -3127,8 +3110,7 @@ int ast_say_date_with_format_en(struct ast_channel *chan, time_t time, const cha
ast_localtime(&time,&tm,timezone);
for (offset=0 ; format[offset] != '\0' ; offset++) {
- if (option_debug)
- ast_log(LOG_DEBUG, "Parsing %c (offset %d) in %s\n", format[offset], offset, format);
+ ast_debug(1, "Parsing %c (offset %d) in %s\n", format[offset], offset, format);
switch (format[offset]) {
/* NOTE: if you add more options here, please try to be consistent with strftime(3) */
case '\'':
@@ -3370,8 +3352,7 @@ int ast_say_date_with_format_da(struct ast_channel *chan, time_t time, const cha
ast_localtime(&time,&tm,timezone);
for (offset=0 ; format[offset] != '\0' ; offset++) {
- if (option_debug)
- ast_log(LOG_DEBUG, "Parsing %c (offset %d) in %s\n", format[offset], offset, format);
+ ast_debug(1, "Parsing %c (offset %d) in %s\n", format[offset], offset, format);
switch (format[offset]) {
/* NOTE: if you add more options here, please try to be consistent with strftime(3) */
case '\'':
@@ -3576,8 +3557,7 @@ int ast_say_date_with_format_de(struct ast_channel *chan, time_t time, const cha
ast_localtime(&time,&tm,timezone);
for (offset=0 ; format[offset] != '\0' ; offset++) {
- if (option_debug)
- ast_log(LOG_DEBUG, "Parsing %c (offset %d) in %s\n", format[offset], offset, format);
+ ast_debug(1, "Parsing %c (offset %d) in %s\n", format[offset], offset, format);
switch (format[offset]) {
/* NOTE: if you add more options here, please try to be consistent with strftime(3) */
case '\'':
@@ -3807,8 +3787,7 @@ int ast_say_date_with_format_he(struct ast_channel *chan, time_t time,
ast_localtime(&time,&tm,timezone);
for (offset=0 ; format[offset] != '\0' ; offset++) {
- if (option_debug)
- ast_log(LOG_DEBUG, "Parsing %c (offset %d) in %s\n", format[offset], offset, format);
+ ast_debug(1, "Parsing %c (offset %d) in %s\n", format[offset], offset, format);
switch (format[offset]) {
/* NOTE: if you add more options here, please try to be consistent with strftime(3) */
case '\'':
@@ -3990,8 +3969,7 @@ int ast_say_date_with_format_es(struct ast_channel *chan, time_t time, const cha
ast_localtime(&time,&tm,timezone);
for (offset=0 ; format[offset] != '\0' ; offset++) {
- if (option_debug)
- ast_log(LOG_DEBUG, "Parsing %c (offset %d) in %s\n", format[offset], offset, format);
+ ast_debug(1, "Parsing %c (offset %d) in %s\n", format[offset], offset, format);
switch (format[offset]) {
/* NOTE: if you add more options here, please try to be consistent with strftime(3) */
case '\'':
@@ -4183,8 +4161,7 @@ int ast_say_date_with_format_fr(struct ast_channel *chan, time_t time, const cha
ast_localtime(&time,&tm,timezone);
for (offset=0 ; format[offset] != '\0' ; offset++) {
- if (option_debug)
- ast_log(LOG_DEBUG, "Parsing %c (offset %d) in %s\n", format[offset], offset, format);
+ ast_debug(1, "Parsing %c (offset %d) in %s\n", format[offset], offset, format);
switch (format[offset]) {
/* NOTE: if you add more options here, please try to be consistent with strftime(3) */
case '\'':
@@ -4382,8 +4359,7 @@ int ast_say_date_with_format_it(struct ast_channel *chan, time_t time, const cha
ast_localtime(&time,&tm,timezone);
for (offset=0 ; format[offset] != '\0' ; offset++) {
- if (option_debug)
- ast_log(LOG_DEBUG, "Parsing %c (offset %d) in %s\n", format[offset], offset, format);
+ ast_debug(1, "Parsing %c (offset %d) in %s\n", format[offset], offset, format);
switch (format[offset]) {
/* NOTE: if you add more options here, please try to be consistent with strftime(3) */
case '\'':
@@ -4616,8 +4592,7 @@ int ast_say_date_with_format_nl(struct ast_channel *chan, time_t time, const cha
ast_localtime(&time,&tm,timezone);
for (offset=0 ; format[offset] != '\0' ; offset++) {
- if (option_debug)
- ast_log(LOG_DEBUG, "Parsing %c (offset %d) in %s\n", format[offset], offset, format);
+ ast_debug(1, "Parsing %c (offset %d) in %s\n", format[offset], offset, format);
switch (format[offset]) {
/* NOTE: if you add more options here, please try to be consistent with strftime(3) */
case '\'':
@@ -4823,8 +4798,7 @@ int ast_say_date_with_format_pl(struct ast_channel *chan, time_t thetime, const
for (offset = 0 ; format[offset] != '\0' ; offset++) {
int remainder;
- if (option_debug)
- ast_log(LOG_DEBUG, "Parsing %c (offset %d) in %s\n", format[offset], offset, format);
+ ast_debug(1, "Parsing %c (offset %d) in %s\n", format[offset], offset, format);
switch (format[offset]) {
/* NOTE: if you add more options here, please try to be consistent with strftime(3) */
case '\'':
@@ -5042,8 +5016,7 @@ int ast_say_date_with_format_pt(struct ast_channel *chan, time_t time, const cha
ast_localtime(&time,&tm,timezone);
for (offset=0 ; format[offset] != '\0' ; offset++) {
- if (option_debug)
- ast_log(LOG_DEBUG, "Parsing %c (offset %d) in %s\n", format[offset], offset, format);
+ ast_debug(1, "Parsing %c (offset %d) in %s\n", format[offset], offset, format);
switch (format[offset]) {
/* NOTE: if you add more options here, please try to be consistent with strftime(3) */
case '\'':
@@ -5341,8 +5314,7 @@ int ast_say_date_with_format_tw(struct ast_channel *chan, time_t time, const cha
ast_localtime(&time,&tm,timezone);
for (offset=0 ; format[offset] != '\0' ; offset++) {
- if (option_debug)
- ast_log(LOG_DEBUG, "Parsing %c (offset %d) in %s\n", format[offset], offset, format);
+ ast_debug(1, "Parsing %c (offset %d) in %s\n", format[offset], offset, format);
switch (format[offset]) {
/* NOTE: if you add more options here, please try to be consistent with strftime(3) */
case '\'':
@@ -6424,8 +6396,7 @@ static int ast_say_number_full_gr(struct ast_channel *chan, int num, const char
num = num % 1000000;
snprintf(fn, sizeof(fn), "digits/millions");
} else {
- if (option_debug)
- ast_log(LOG_DEBUG, "Number '%d' is too big for me\n", num);
+ ast_debug(1, "Number '%d' is too big for me\n", num);
res = -1;
}
}
@@ -6590,8 +6561,7 @@ static int ast_say_date_with_format_gr(struct ast_channel *chan, time_t time, co
ast_localtime(&time,&tm,timezone);
for (offset=0 ; format[offset] != '\0' ; offset++) {
- if (option_debug)
- ast_log(LOG_DEBUG, "Parsing %c (offset %d) in %s\n", format[offset], offset, format);
+ ast_debug(1, "Parsing %c (offset %d) in %s\n", format[offset], offset, format);
switch (format[offset]) {
/* NOTE: if you add more options here, please try to be consistent with strftime(3) */
case '\'':