mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-14 00:24:05 +00:00
pbx.c: fix confused match caller id that deleted exten still in hash
This fixes a bug where a zero length callerid match adjacent to a no match callerid extension entry would be deleted together, which then resulted in hashtable references to free'd memory. A third state of the matchcid value has been added to indicate match to any extension which allows enforcing comparison of matchcid on/off without errors. (closes issue AST-1235) Reported by: Guenther Kelleter Review: https://reviewboard.asterisk.org/r/2930/ ........ Merged revisions 401959 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 401960 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 401961 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@401962 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -69,6 +69,16 @@ enum ast_extension_states {
|
||||
AST_EXTENSION_ONHOLD = 1 << 4, /*!< All devices ONHOLD */
|
||||
};
|
||||
|
||||
/*!
|
||||
* \brief extension matchcid types
|
||||
* \note matchcid in ast_exten retains 0/1, this adds 3rd state for functions to specify all
|
||||
* \see ast_context_remove_extension_callerid
|
||||
*/
|
||||
enum ast_ext_matchcid_types {
|
||||
AST_EXT_MATCHCID_OFF = 0, /*!< Match only extensions with matchcid=0 */
|
||||
AST_EXT_MATCHCID_ON = 1, /*!< Match only extensions with matchcid=1 AND cidmatch matches */
|
||||
AST_EXT_MATCHCID_ANY = 2, /*!< Match both - used only in functions manipulating ast_exten's */
|
||||
};
|
||||
|
||||
struct ast_context;
|
||||
struct ast_exten;
|
||||
|
Reference in New Issue
Block a user