From 35fb1f546fd759b209190c9b259dfba5efbf71a4 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 27 Jan 2010 22:27:26 +0000 Subject: [PATCH] add leading m:: to change delim on inline dp eg m:^:set:foo=bar^set=blah=true to put an end to Vagabond's suffering git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16526 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/applications/mod_dptools/mod_dptools.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/mod/applications/mod_dptools/mod_dptools.c b/src/mod/applications/mod_dptools/mod_dptools.c index 3f0ec9c5d1..62fbfb133a 100644 --- a/src/mod/applications/mod_dptools/mod_dptools.c +++ b/src/mod/applications/mod_dptools/mod_dptools.c @@ -46,6 +46,7 @@ SWITCH_STANDARD_DIALPLAN(inline_dialplan_hunt) int x = 0; char *lbuf; char *target = arg; + char delim = ','; if (!caller_profile) { caller_profile = switch_channel_get_caller_profile(channel); @@ -59,12 +60,19 @@ SWITCH_STANDARD_DIALPLAN(inline_dialplan_hunt) target = caller_profile->destination_number; } - if (!zstr(target) && (lbuf = switch_core_session_strdup(session, target)) - && (argc = switch_separate_string(lbuf, ',', argv, (sizeof(argv) / sizeof(argv[0]))))) { - } else { + + if (zstr(target)) { return NULL; + } else { + lbuf = switch_core_session_strdup(session, target); } + if (*lbuf == 'm' && *(lbuf + 1) == ':' && *(lbuf + 3) == ':') { + delim = *(lbuf + 2); + lbuf += 4; + } + + argc = switch_separate_string(lbuf, delim, argv, (sizeof(argv) / sizeof(argv[0]))); for (x = 0; x < argc; x++) { char *app = argv[x];