diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-09-26 20:19:33 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-09-26 20:19:33 +0000 |
commit | ed75fc9e401c44ef7b162234a8bea01e4bb02145 (patch) | |
tree | 0b23ada82ec05881d9c2493ad69a7a411068a5f9 /channels | |
parent | ae969b1ff0c6df8b8ee29b363d0c994150d6d506 (diff) |
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/branches/1.4@43697 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_local.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/channels/chan_local.c b/channels/chan_local.c index 99b3177b2..9896f0f1d 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); |