diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-10 16:53:16 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-10 16:53:16 +0000 |
commit | 843b42feac25bc64cdf9582a36fbb489c8bb6e44 (patch) | |
tree | f25f8604451f77dfc129f5cf9d625ecf684b3569 /apps | |
parent | 24b76f7acb42526b281446b6439a7a26da892771 (diff) |
Only split up extension and context if a value exists. (issue #8332 reported by loloski)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@47437 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_chanspy.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c index 2d6b8e2ff..cf1e4759d 100644 --- a/apps/app_chanspy.c +++ b/apps/app_chanspy.c @@ -658,7 +658,8 @@ static int extenspy_exec(struct ast_channel *chan, void *data) if ((argc = ast_app_separate_args(data, '|', argv, sizeof(argv) / sizeof(argv[0])))) { context = argv[0]; - exten = strsep(&context, "@"); + if (!ast_strlen_zero(argv[0])) + exten = strsep(&context, "@"); if (ast_strlen_zero(context)) context = ast_strdupa(chan->context); if (argc > 1) |