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: https://origsvn.digium.com/svn/asterisk/trunk@43698 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
becd11ddb8
commit
36a9656234
|
@ -127,7 +127,7 @@ static AST_LIST_HEAD_STATIC(locals, local_pvt);
|
||||||
static int local_devicestate(void *data)
|
static int local_devicestate(void *data)
|
||||||
{
|
{
|
||||||
char *exten = ast_strdupa(data);
|
char *exten = ast_strdupa(data);
|
||||||
char *context = NULL;
|
char *context = NULL, *opts = NULL;
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
if (!(context = strchr(exten, '@'))) {
|
if (!(context = strchr(exten, '@'))) {
|
||||||
|
@ -137,6 +137,10 @@ static int local_devicestate(void *data)
|
||||||
|
|
||||||
*context++ = '\0';
|
*context++ = '\0';
|
||||||
|
|
||||||
|
/* Strip options if they exist */
|
||||||
|
if ((opts = strchr(context, '/')))
|
||||||
|
*opts = '\0';
|
||||||
|
|
||||||
if (option_debug > 2)
|
if (option_debug > 2)
|
||||||
ast_log(LOG_DEBUG, "Checking if extension %s@%s exists (devicestate)\n", exten, context);
|
ast_log(LOG_DEBUG, "Checking if extension %s@%s exists (devicestate)\n", exten, context);
|
||||||
res = ast_exists_extension(NULL, context, exten, 1, NULL);
|
res = ast_exists_extension(NULL, context, exten, 1, NULL);
|
||||||
|
|
Loading…
Reference in New Issue