提交 3a2e1d03 authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-3176 --comment-only try this patch, native is a special case so use the…

FS-3176 --comment-only try this patch, native is a special case so use the extension native e.g. en.native
上级 6e78f6f5
...@@ -1995,14 +1995,23 @@ SWITCH_DECLARE(void) switch_say_file(switch_say_file_handle_t *sh, const char *f ...@@ -1995,14 +1995,23 @@ SWITCH_DECLARE(void) switch_say_file(switch_say_file_handle_t *sh, const char *f
char buf[256] = ""; char buf[256] = "";
int ret; int ret;
va_list ap; va_list ap;
int native = !strcasecmp(sh->ext, "native");
va_start(ap, fmt); va_start(ap, fmt);
if ((ret = switch_vsnprintf(buf, sizeof(buf), fmt, ap)) > 0) { if ((ret = switch_vsnprintf(buf, sizeof(buf), fmt, ap)) > 0) {
if (!sh->cnt++) { if (!sh->cnt++) {
sh->stream.write_function(&sh->stream, "file_string://%s.%s", buf, sh->ext); if (native) {
sh->stream.write_function(&sh->stream, "file_string://%s", buf);
} else {
sh->stream.write_function(&sh->stream, "file_string://%s.%s", buf, sh->ext);
}
} else { } else {
sh->stream.write_function(&sh->stream, "!%s.%s", buf, sh->ext); if (native) {
sh->stream.write_function(&sh->stream, "!%s", buf);
} else {
sh->stream.write_function(&sh->stream, "!%s.%s", buf, sh->ext);
}
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论