aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_local.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-26 20:20:34 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-26 20:20:34 +0000
commit6168fe18003d6e4d29a8b1d75feaeef4d92006d0 (patch)
tree43e763b321191fe2c5696aa0ef7caea7eccc78ef /channels/chan_local.c
parentbb65c259b49272966c1bf4b9a911e2a486d2a565 (diff)
Merged revisions 43697 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r43697 | file | 2006-09-26 16:19:33 -0400 (Tue, 26 Sep 2006) | 2 lines Strip options off the argument passed for devicestate in chan_local. (issue #8034 reported by pcardozo) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43698 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_local.c')
-rw-r--r--channels/chan_local.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/channels/chan_local.c b/channels/chan_local.c
index 63e230e34..998a74ae0 100644
--- a/channels/chan_local.c
+++ b/channels/chan_local.c
@@ -127,7 +127,7 @@ static AST_LIST_HEAD_STATIC(locals, local_pvt);
static int local_devicestate(void *data)
{
char *exten = ast_strdupa(data);
- char *context = NULL;
+ char *context = NULL, *opts = NULL;
int res;
if (!(context = strchr(exten, '@'))) {
@@ -137,6 +137,10 @@ static int local_devicestate(void *data)
*context++ = '\0';
+ /* Strip options if they exist */
+ if ((opts = strchr(context, '/')))
+ *opts = '\0';
+
if (option_debug > 2)
ast_log(LOG_DEBUG, "Checking if extension %s@%s exists (devicestate)\n", exten, context);
res = ast_exists_extension(NULL, context, exten, 1, NULL);