aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-03 16:11:29 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-03 16:11:29 +0000
commit728babbe04baf27f4cc76f59c6414f8ab1798405 (patch)
treee6b6fa8fe67dec552e7e9161166da310d16188c3 /apps
parent2ffaec5b53773e415cbab6e20c45c75113f07406 (diff)
Reverting index() fix, applying a different methodology, based upon developer discussions.
(related to issue #15639) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@210066 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_playback.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/app_playback.c b/apps/app_playback.c
index 8f78bef78..6763bd917 100644
--- a/apps/app_playback.c
+++ b/apps/app_playback.c
@@ -207,13 +207,13 @@ static int do_say(say_args_t *a, const char *s, const char *options, int depth)
pbx_substitute_variables_varshead(&head, x, fn, sizeof(fn));
/* locate prefix and data, if any */
- fmt = index(fn, ':');
+ fmt = strchr(fn, ':');
if (!fmt || fmt == fn) { /* regular filename */
ret = s_streamwait3(a, fn);
continue;
}
fmt++;
- data = index(fmt, ':'); /* colon before data */
+ data = strchr(fmt, ':'); /* colon before data */
if (!data || data == fmt) { /* simple prefix-fmt */
ret = do_say(a, fn, options, depth);
continue;
@@ -226,14 +226,14 @@ static int do_say(say_args_t *a, const char *s, const char *options, int depth)
if (*p == '\'') {/* file name - we trim them */
char *y;
strcpy(fn2, ast_skip_blanks(p+1)); /* make a full copy */
- y = index(fn2, '\'');
+ y = strchr(fn2, '\'');
if (!y) {
p = data; /* invalid. prepare to end */
break;
}
*y = '\0';
ast_trim_blanks(fn2);
- p = index(p+1, '\'');
+ p = strchr(p + 1, '\'');
ret = s_streamwait3(a, fn2);
} else {
int l = fmt-fn;