summaryrefslogtreecommitdiff
path: root/main/say.c
diff options
context:
space:
mode:
authorTerry Wilson <twilson@digium.com>2012-01-24 20:12:09 +0000
committerTerry Wilson <twilson@digium.com>2012-01-24 20:12:09 +0000
commit99cae5b7508f30a308afbbacf92ad306a30f68df (patch)
treebdca00ce837e60a5f9a16fed06d02f6e77235035 /main/say.c
parent2144ba5df2813609024964c4c2d9060b30d5cd43 (diff)
Opaquify channel stringfields
Continue channel opaque-ification by wrapping all of the stringfields. Eventually, we will restrict what can actually set these variables, but the purpose for now is to hide the implementation and keep people from adding code that directly accesses the channel structure. Semantic changes will follow afterward. Review: https://reviewboard.asterisk.org/r/1661/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/say.c')
-rw-r--r--main/say.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/main/say.c b/main/say.c
index dbeb8ba9c..1397cab36 100644
--- a/main/say.c
+++ b/main/say.c
@@ -7295,7 +7295,7 @@ static int ast_say_number_full_gr(struct ast_channel *chan, int num, const char
if (!num) {
ast_copy_string(fn, "digits/0", sizeof(fn));
- res = ast_streamfile(chan, fn, chan->language);
+ res = ast_streamfile(chan, fn, ast_channel_language(chan));
if (!res)
return ast_waitstream(chan, ints);
}
@@ -7323,14 +7323,14 @@ static int ast_say_number_full_gr(struct ast_channel *chan, int num, const char
} else {
/* num > 1000 */
if (num < 1000000) {
- res = ast_say_number_full_gr(chan, (num / 1000), ints, chan->language, audiofd, ctrlfd);
+ res = ast_say_number_full_gr(chan, (num / 1000), ints, ast_channel_language(chan), audiofd, ctrlfd);
if (res)
return res;
num %= 1000;
snprintf(fn, sizeof(fn), "digits/thousands");
} else {
if (num < 1000000000) { /* 1,000,000,000 */
- res = ast_say_number_full_gr(chan, (num / 1000000), ints, chan->language, audiofd, ctrlfd);
+ res = ast_say_number_full_gr(chan, (num / 1000000), ints, ast_channel_language(chan), audiofd, ctrlfd);
if (res)
return res;
num %= 1000000;
@@ -7538,7 +7538,7 @@ static int ast_say_date_with_format_gr(struct ast_channel *chan, time_t t, const
case 'Y':
/* Year */
- ast_say_number_full_gr(chan, 1900+tm.tm_year, ints, chan->language, -1, -1);
+ ast_say_number_full_gr(chan, 1900+tm.tm_year, ints, ast_channel_language(chan), -1, -1);
break;
case 'I':
case 'l':
@@ -8296,11 +8296,11 @@ int ast_say_counted_noun(struct ast_channel *chan, int num, const char noun[])
char *temp;
int temp_len;
const char *ending;
- if (!strncasecmp(chan->language, "ru", 2)) { /* Russian */
+ if (!strncasecmp(ast_channel_language(chan), "ru", 2)) { /* Russian */
ending = counted_noun_ending_slavic(num);
- } else if (!strncasecmp(chan->language, "ua", 2)) { /* Ukrainian */
+ } else if (!strncasecmp(ast_channel_language(chan), "ua", 2)) { /* Ukrainian */
ending = counted_noun_ending_slavic(num);
- } else if (!strncasecmp(chan->language, "pl", 2)) { /* Polish */
+ } else if (!strncasecmp(ast_channel_language(chan), "pl", 2)) { /* Polish */
ending = counted_noun_ending_slavic(num);
} else { /* English and default */
ending = counted_noun_ending_en(num);
@@ -8338,11 +8338,11 @@ int ast_say_counted_adjective(struct ast_channel *chan, int num, const char adje
char *temp;
int temp_len;
const char *ending;
- if (!strncasecmp(chan->language, "ru", 2)) { /* Russian */
+ if (!strncasecmp(ast_channel_language(chan), "ru", 2)) { /* Russian */
ending = counted_adjective_ending_ru(num, gender);
- } else if (!strncasecmp(chan->language, "ua", 2)) { /* Ukrainian */
+ } else if (!strncasecmp(ast_channel_language(chan), "ua", 2)) { /* Ukrainian */
ending = counted_adjective_ending_ru(num, gender);
- } else if (!strncasecmp(chan->language, "pl", 2)) { /* Polish */
+ } else if (!strncasecmp(ast_channel_language(chan), "pl", 2)) { /* Polish */
ending = counted_adjective_ending_ru(num, gender);
} else { /* English and default */
ending = "";