From c6231acb7c6f2da25c76e8c9bf048cacd5ef775d Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 17 Oct 2007 18:37:18 +0000 Subject: [PATCH] change dialplan a little (part2) git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5939 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_channel.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/switch_channel.c b/src/switch_channel.c index c7dd311e42..290d0de2d6 100644 --- a/src/switch_channel.c +++ b/src/switch_channel.c @@ -1270,10 +1270,15 @@ SWITCH_DECLARE(char *) switch_channel_expand_variables(switch_channel_t *channel char *sub_val = NULL, *func_val = NULL; int nv = 0; - if (!in || !strchr(in, '$')) { + if (in && (p = strchr(in, '$'))) { + if (!*(p + 1)) { + return in; + } + } else { return in; } + olen = strlen(in); indup = strdup(in);