mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-18 18:58:22 +00:00
Stasis: Convert network change events into network change stasis messages
(issue ASTERISK-21103) Review: https://reviewboard.asterisk.org/r/2490/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387594 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
21
main/event.c
21
main/event.c
@@ -142,7 +142,6 @@ static int ast_event_cmp(void *obj, void *arg, int flags);
|
||||
static int ast_event_hash_mwi(const void *obj, const int flags);
|
||||
static int ast_event_hash_devstate(const void *obj, const int flags);
|
||||
static int ast_event_hash_devstate_change(const void *obj, const int flags);
|
||||
static int ast_event_hash_presence_state_change(const void *obj, const int flags);
|
||||
|
||||
#ifdef LOW_MEMORY
|
||||
#define NUM_CACHE_BUCKETS 17
|
||||
@@ -189,10 +188,6 @@ static struct cache_events ast_event_cache[AST_EVENT_TOTAL] = {
|
||||
.hash_fn = ast_event_hash_devstate_change,
|
||||
.cache_args = { AST_EVENT_IE_DEVICE, AST_EVENT_IE_EID, },
|
||||
},
|
||||
[AST_EVENT_PRESENCE_STATE] = {
|
||||
.hash_fn = ast_event_hash_presence_state_change,
|
||||
.cache_args = { AST_EVENT_IE_PRESENCE_STATE, },
|
||||
},
|
||||
};
|
||||
|
||||
/*!
|
||||
@@ -1614,22 +1609,6 @@ static int ast_event_hash_devstate_change(const void *obj, const int flags)
|
||||
return ast_str_hash(ast_event_get_ie_str(event, AST_EVENT_IE_DEVICE));
|
||||
}
|
||||
|
||||
/*!
|
||||
* \internal
|
||||
* \brief Hash function for AST_EVENT_PRESENCE_STATE
|
||||
*
|
||||
* \param[in] obj an ast_event
|
||||
* \param[in] flags unused
|
||||
*
|
||||
* \return hash value
|
||||
*/
|
||||
static int ast_event_hash_presence_state_change(const void *obj, const int flags)
|
||||
{
|
||||
const struct ast_event *event = obj;
|
||||
|
||||
return ast_str_hash(ast_event_get_ie_str(event, AST_EVENT_IE_PRESENCE_PROVIDER));
|
||||
}
|
||||
|
||||
static int ast_event_hash(const void *obj, const int flags)
|
||||
{
|
||||
const struct ast_event_ref *event_ref;
|
||||
|
Reference in New Issue
Block a user