mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-18 15:49:56 +00:00
Make hints for invalid SIP devices return Unavail, not idle
This patch drastically simplifies the device state aggegation code. The old method was not only overly complex, but also made it impossible to return AST_DEVICE_INVALID from the aggregation code. The unit test update is as a result of fixing that bug. The SIP change stems from a bug introduced by removing a DNS lookup for hostname-based SIP channels. (closes issue ASTERISK-16702) Review: https://reviewboard.asterisk.org/r/1808/ ........ Merged revisions 358943 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 358944 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358945 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -254,14 +254,9 @@ enum ast_device_state ast_devstate_aggregate_result(struct ast_devstate_aggregat
|
||||
* This struct is only here so that it can be easily declared on the stack.
|
||||
*/
|
||||
struct ast_devstate_aggregate {
|
||||
unsigned int all_unknown:1;
|
||||
unsigned int all_unavail:1;
|
||||
unsigned int all_busy:1;
|
||||
unsigned int all_free:1;
|
||||
unsigned int on_hold:1;
|
||||
unsigned int busy:1;
|
||||
unsigned int in_use:1;
|
||||
unsigned int ring:1;
|
||||
unsigned int ringing:1;
|
||||
unsigned int inuse:1;
|
||||
enum ast_device_state state;
|
||||
};
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user