From: Joshua Colp Date: Fri, 10 Nov 2006 16:53:16 +0000 (+0000) Subject: Only split up extension and context if a value exists. (issue #8332 reported by loloski) X-Git-Tag: 1.4.0-beta4~159 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6c9e737d70df933564811576ed6d1fc8b2a53c80;p=thirdparty%2Fasterisk.git Only split up extension and context if a value exists. (issue #8332 reported by loloski) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@47437 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c index 2d6b8e2ff3..cf1e4759d2 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)