diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-06-26 19:31:14 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-06-26 19:31:14 +0000 |
commit | e93329b1c836a0582def6217ace4749d9aaf6d04 (patch) | |
tree | ef26687a5ece766d96505570dba41297299cd8ed /main/pbx.c | |
parent | c26b86e763ee6beb11653c871e356ce7f200a406 (diff) |
Make invalid hints report Unavailable instead of Idle.
(closes issue #14413)
Reported by: pj
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@203702 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/pbx.c')
-rw-r--r-- | main/pbx.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/main/pbx.c b/main/pbx.c index c7de70f87..4d1bfb493 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -4101,8 +4101,9 @@ static int ast_extension_state2(struct ast_exten *e) rest = ast_str_buffer(hint); /* 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)); + } state = ast_devstate_aggregate_result(&agg); @@ -4112,6 +4113,8 @@ static int ast_extension_state2(struct ast_exten *e) case AST_DEVICE_BUSY: return AST_EXTENSION_BUSY; case AST_DEVICE_UNAVAILABLE: + case AST_DEVICE_UNKNOWN: + case AST_DEVICE_INVALID: return AST_EXTENSION_UNAVAILABLE; case AST_DEVICE_RINGINUSE: return (AST_EXTENSION_INUSE | AST_EXTENSION_RINGING); @@ -4119,8 +4122,6 @@ static int ast_extension_state2(struct ast_exten *e) return AST_EXTENSION_RINGING; case AST_DEVICE_INUSE: return AST_EXTENSION_INUSE; - case AST_DEVICE_UNKNOWN: - case AST_DEVICE_INVALID: case AST_DEVICE_NOT_INUSE: return AST_EXTENSION_NOT_INUSE; } |