Reverting index() fix, applying a different methodology, based upon developer discussions.

(related to issue #15639)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@210066 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2009-08-03 16:11:29 +00:00
parent f5a5763ee9
commit ca0f026f41
9 changed files with 10 additions and 26 deletions

View File

@@ -89,7 +89,7 @@ static int sort_internal(struct ast_channel *chan, char *data, char *buffer, siz
/* Parse each into a struct */
count2 = 0;
while ((ptrkey = strsep(&strings, "|"))) {
ptrvalue = index(ptrkey, ':');
ptrvalue = strchr(ptrkey, ':');
if (!ptrvalue) {
count--;
continue;
@@ -191,7 +191,7 @@ static int cut_internal(struct ast_channel *chan, char *data, char *buffer, size
/* Get to start, if any */
if (num1 > 0) {
while (tmp2 != (char *)NULL + 1 && curfieldnum < num1) {
tmp2 = index(tmp2, d) + 1;
tmp2 = strchr(tmp2, d) + 1;
curfieldnum++;
}
}