add switch_ivr_enterprise_originate optional new dimension to originate strings every element in :_: separated list in originate strings will fire in a dedicated thread and can contain their own {} and , and | lists

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15455 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2009-11-12 22:21:30 +00:00
parent 7d0980232e
commit 06a68fce64
4 changed files with 221 additions and 4 deletions

View File

@@ -1589,6 +1589,25 @@ static char *cleanup_separated_string(char *str, char delim)
return start;
}
SWITCH_DECLARE(unsigned int) switch_separate_string_string(char *buf, char *delim, char **array, unsigned int arraylen)
{
unsigned int count = 0;
char *d;
size_t dlen = strlen(delim);
array[count++] = buf;
while (count < arraylen && array[count-1]) {
if ((d = strstr(array[count-1], delim))) {
*d = '\0';
d += dlen;
array[count++] = d;
} else break;
}
return count;
}
/* Separate a string using a delimiter that is not a space */
static unsigned int separate_string_char_delim(char *buf, char delim, char **array, unsigned int arraylen)
{