summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorScott Griepentrog <sgriepentrog@digium.com>2013-10-25 20:51:13 +0000
committerScott Griepentrog <sgriepentrog@digium.com>2013-10-25 20:51:13 +0000
commit7b42a6828a1f98862b673f9e1c2b9a5c105231db (patch)
treeae80b3cf106a6a7fcaae55314cce8e45d6314a5a /include
parentbb1568caa12dd10cbbe7ec84fcbdcfd0f3a2156c (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/pbx.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/asterisk/pbx.h b/include/asterisk/pbx.h
index 54e116ae0..dfdb23f80 100644
--- a/include/asterisk/pbx.h
+++ b/include/asterisk/pbx.h
@@ -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;