]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-3176 --comment-only try this patch, native is a special case so use the extension...
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 30 Mar 2011 15:55:40 +0000 (10:55 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 30 Mar 2011 15:55:40 +0000 (10:55 -0500)
src/switch_loadable_module.c

index 9804e53238e248ac75d685ddaed955e358dbc7c7..0c803a71b4c7913013726bf5a92e235aa0e29521 100644 (file)
@@ -1995,14 +1995,23 @@ SWITCH_DECLARE(void) switch_say_file(switch_say_file_handle_t *sh, const char *f
        char buf[256] = "";
        int ret;
        va_list ap;
+       int native = !strcasecmp(sh->ext, "native");
 
        va_start(ap, fmt);
        
        if ((ret = switch_vsnprintf(buf, sizeof(buf), fmt, ap)) > 0) {
                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 {
-                       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);
+                       }
                }
 
        }