mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 01:49:05 +00:00
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:
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user