mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-08 10:58:15 +00:00
Don't limit the length of the hint at the final step (from ~8100 chars max
(or ~500 chars max on LOW_MEMORY) to 80 chars max). This will allow more channels to be used in a single hint. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@159162 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -762,6 +762,7 @@ struct ast_app;
|
|||||||
static struct ast_taskprocessor *device_state_tps;
|
static struct ast_taskprocessor *device_state_tps;
|
||||||
|
|
||||||
AST_THREADSTORAGE(switch_data);
|
AST_THREADSTORAGE(switch_data);
|
||||||
|
AST_THREADSTORAGE(extensionstate_buf);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief ast_exten: An extension
|
\brief ast_exten: An extension
|
||||||
@@ -3707,7 +3708,7 @@ static struct ast_exten *ast_hint_extension(struct ast_channel *c, const char *c
|
|||||||
/*! \brief Check state of extension by using hints */
|
/*! \brief Check state of extension by using hints */
|
||||||
static int ast_extension_state2(struct ast_exten *e)
|
static int ast_extension_state2(struct ast_exten *e)
|
||||||
{
|
{
|
||||||
char hint[AST_MAX_EXTENSION] = "";
|
struct ast_str *hint = ast_str_thread_get(&extensionstate_buf, 16);
|
||||||
char *cur, *rest;
|
char *cur, *rest;
|
||||||
struct ast_devstate_aggregate agg;
|
struct ast_devstate_aggregate agg;
|
||||||
enum ast_device_state state;
|
enum ast_device_state state;
|
||||||
@@ -3717,9 +3718,9 @@ static int ast_extension_state2(struct ast_exten *e)
|
|||||||
|
|
||||||
ast_devstate_aggregate_init(&agg);
|
ast_devstate_aggregate_init(&agg);
|
||||||
|
|
||||||
ast_copy_string(hint, ast_get_extension_app(e), sizeof(hint));
|
ast_str_set(&hint, 0, "%s", ast_get_extension_app(e));
|
||||||
|
|
||||||
rest = hint; /* One or more devices separated with a & character */
|
rest = hint->str; /* One or more devices separated with a & character */
|
||||||
|
|
||||||
while ( (cur = strsep(&rest, "&")) )
|
while ( (cur = strsep(&rest, "&")) )
|
||||||
ast_devstate_aggregate_add(&agg, ast_device_state(cur));
|
ast_devstate_aggregate_add(&agg, ast_device_state(cur));
|
||||||
|
|||||||
Reference in New Issue
Block a user