mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-06 23:49:31 +00:00
fix path bs
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6110 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
8e8a31a0dc
commit
eff23152c1
@ -675,25 +675,14 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!strstr(file, SWITCH_URL_SEPARATOR)) {
|
if (!strstr(file, SWITCH_URL_SEPARATOR)) {
|
||||||
if (switch_is_file_path(file)) {
|
if (!switch_is_file_path(file)) {
|
||||||
char *new_file;
|
file = switch_core_session_sprintf(session, "%s%s%s", prefix, SWITCH_PATH_SEPARATOR, file);
|
||||||
uint32_t len;
|
|
||||||
len = (uint32_t) strlen(file) + (uint32_t) strlen(prefix) + 10;
|
|
||||||
new_file = switch_core_session_alloc(session, len);
|
|
||||||
snprintf(new_file, len, "%s%s%s", prefix, SWITCH_PATH_SEPARATOR, file);
|
|
||||||
file = new_file;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ext = strrchr(file, '.'))) {
|
if ((ext = strrchr(file, '.'))) {
|
||||||
ext++;
|
ext++;
|
||||||
} else {
|
} else {
|
||||||
char *new_file;
|
|
||||||
uint32_t len;
|
|
||||||
ext = read_codec->implementation->iananame;
|
ext = read_codec->implementation->iananame;
|
||||||
len = (uint32_t) strlen(file) + (uint32_t) strlen(ext) + 2;
|
file = switch_core_session_sprintf(session, "%s.%s", file, ext);
|
||||||
new_file = switch_core_session_alloc(session, len);
|
|
||||||
snprintf(new_file, len, "%s.%s", file, ext);
|
|
||||||
file = new_file;
|
|
||||||
asis = 1;
|
asis = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user