[svn-commits] kmoore: branch kmoore/event_system_strip r395304 - in /team/kmoore/event_syst...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Jul 24 15:05:49 CDT 2013
Author: kmoore
Date: Wed Jul 24 15:05:47 2013
New Revision: 395304
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=395304
Log:
Remove useless event.h includes, start ripping out the event cache, and clean things up
Modified:
team/kmoore/event_system_strip/apps/app_queue.c
team/kmoore/event_system_strip/apps/app_voicemail.c
team/kmoore/event_system_strip/channels/chan_dahdi.c
team/kmoore/event_system_strip/channels/chan_iax2.c
team/kmoore/event_system_strip/channels/chan_mgcp.c
team/kmoore/event_system_strip/channels/chan_sip.c
team/kmoore/event_system_strip/channels/chan_skinny.c
team/kmoore/event_system_strip/channels/chan_unistim.c
team/kmoore/event_system_strip/channels/sig_pri.h
team/kmoore/event_system_strip/funcs/func_presencestate.c
team/kmoore/event_system_strip/include/asterisk/event.h
team/kmoore/event_system_strip/include/asterisk/event_defs.h
team/kmoore/event_system_strip/main/ccss.c
team/kmoore/event_system_strip/main/devicestate.c
team/kmoore/event_system_strip/main/event.c
team/kmoore/event_system_strip/main/manager.c
team/kmoore/event_system_strip/main/pbx.c
team/kmoore/event_system_strip/main/presencestate.c
team/kmoore/event_system_strip/res/parking/parking_applications.c
team/kmoore/event_system_strip/res/parking/parking_manager.c
team/kmoore/event_system_strip/res/parking/parking_ui.c
team/kmoore/event_system_strip/res/res_jabber.c
team/kmoore/event_system_strip/res/res_parking.c
team/kmoore/event_system_strip/res/res_xmpp.c
team/kmoore/event_system_strip/tests/test_event.c
Modified: team/kmoore/event_system_strip/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/event_system_strip/apps/app_queue.c?view=diff&rev=395304&r1=395303&r2=395304
==============================================================================
--- team/kmoore/event_system_strip/apps/app_queue.c (original)
+++ team/kmoore/event_system_strip/apps/app_queue.c Wed Jul 24 15:05:47 2013
@@ -96,7 +96,6 @@
#include "asterisk/astdb.h"
#include "asterisk/devicestate.h"
#include "asterisk/stringfields.h"
-#include "asterisk/event.h"
#include "asterisk/astobj2.h"
#include "asterisk/strings.h"
#include "asterisk/global_datastores.h"
Modified: team/kmoore/event_system_strip/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/event_system_strip/apps/app_voicemail.c?view=diff&rev=395304&r1=395303&r2=395304
==============================================================================
--- team/kmoore/event_system_strip/apps/app_voicemail.c (original)
+++ team/kmoore/event_system_strip/apps/app_voicemail.c Wed Jul 24 15:05:47 2013
@@ -131,7 +131,6 @@
#include "asterisk/strings.h"
#include "asterisk/smdi.h"
#include "asterisk/astobj2.h"
-#include "asterisk/event.h"
#include "asterisk/taskprocessor.h"
#include "asterisk/test.h"
Modified: team/kmoore/event_system_strip/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/event_system_strip/channels/chan_dahdi.c?view=diff&rev=395304&r1=395303&r2=395304
==============================================================================
--- team/kmoore/event_system_strip/channels/chan_dahdi.c (original)
+++ team/kmoore/event_system_strip/channels/chan_dahdi.c Wed Jul 24 15:05:47 2013
@@ -118,7 +118,6 @@
#include "asterisk/abstract_jb.h"
#include "asterisk/smdi.h"
#include "asterisk/astobj.h"
-#include "asterisk/event.h"
#include "asterisk/devicestate.h"
#include "asterisk/paths.h"
#include "asterisk/ccss.h"
Modified: team/kmoore/event_system_strip/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/event_system_strip/channels/chan_iax2.c?view=diff&rev=395304&r1=395303&r2=395304
==============================================================================
--- team/kmoore/event_system_strip/channels/chan_iax2.c (original)
+++ team/kmoore/event_system_strip/channels/chan_iax2.c Wed Jul 24 15:05:47 2013
@@ -93,7 +93,6 @@
#include "asterisk/netsock.h"
#include "asterisk/stringfields.h"
#include "asterisk/linkedlists.h"
-#include "asterisk/event.h"
#include "asterisk/astobj2.h"
#include "asterisk/timing.h"
#include "asterisk/taskprocessor.h"
Modified: team/kmoore/event_system_strip/channels/chan_mgcp.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/event_system_strip/channels/chan_mgcp.c?view=diff&rev=395304&r1=395303&r2=395304
==============================================================================
--- team/kmoore/event_system_strip/channels/chan_mgcp.c (original)
+++ team/kmoore/event_system_strip/channels/chan_mgcp.c Wed Jul 24 15:05:47 2013
@@ -78,7 +78,6 @@
#include "asterisk/devicestate.h"
#include "asterisk/stringfields.h"
#include "asterisk/abstract_jb.h"
-#include "asterisk/event.h"
#include "asterisk/chanvars.h"
#include "asterisk/pktccops.h"
#include "asterisk/stasis.h"
Modified: team/kmoore/event_system_strip/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/event_system_strip/channels/chan_sip.c?view=diff&rev=395304&r1=395303&r2=395304
==============================================================================
--- team/kmoore/event_system_strip/channels/chan_sip.c (original)
+++ team/kmoore/event_system_strip/channels/chan_sip.c Wed Jul 24 15:05:47 2013
@@ -275,7 +275,6 @@
#include "asterisk/threadstorage.h"
#include "asterisk/translate.h"
#include "asterisk/ast_version.h"
-#include "asterisk/event.h"
#include "asterisk/data.h"
#include "asterisk/aoc.h"
#include "asterisk/message.h"
Modified: team/kmoore/event_system_strip/channels/chan_skinny.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/event_system_strip/channels/chan_skinny.c?view=diff&rev=395304&r1=395303&r2=395304
==============================================================================
--- team/kmoore/event_system_strip/channels/chan_skinny.c (original)
+++ team/kmoore/event_system_strip/channels/chan_skinny.c Wed Jul 24 15:05:47 2013
@@ -77,7 +77,6 @@
#include "asterisk/abstract_jb.h"
#include "asterisk/threadstorage.h"
#include "asterisk/devicestate.h"
-#include "asterisk/event.h"
#include "asterisk/indications.h"
#include "asterisk/linkedlists.h"
#include "asterisk/stasis_endpoints.h"
Modified: team/kmoore/event_system_strip/channels/chan_unistim.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/event_system_strip/channels/chan_unistim.c?view=diff&rev=395304&r1=395303&r2=395304
==============================================================================
--- team/kmoore/event_system_strip/channels/chan_unistim.c (original)
+++ team/kmoore/event_system_strip/channels/chan_unistim.c Wed Jul 24 15:05:47 2013
@@ -63,7 +63,6 @@
#include "asterisk/config.h"
#include "asterisk/module.h"
#include "asterisk/pbx.h"
-#include "asterisk/event.h"
#include "asterisk/rtp_engine.h"
#include "asterisk/netsock2.h"
#include "asterisk/acl.h"
Modified: team/kmoore/event_system_strip/channels/sig_pri.h
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/event_system_strip/channels/sig_pri.h?view=diff&rev=395304&r1=395303&r2=395304
==============================================================================
--- team/kmoore/event_system_strip/channels/sig_pri.h (original)
+++ team/kmoore/event_system_strip/channels/sig_pri.h Wed Jul 24 15:05:47 2013
@@ -27,7 +27,6 @@
#include "asterisk/channel.h"
#include "asterisk/frame.h"
-#include "asterisk/event.h"
#include "asterisk/ccss.h"
#include <libpri.h>
#include <dahdi/user.h>
Modified: team/kmoore/event_system_strip/funcs/func_presencestate.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/event_system_strip/funcs/func_presencestate.c?view=diff&rev=395304&r1=395303&r2=395304
==============================================================================
--- team/kmoore/event_system_strip/funcs/func_presencestate.c (original)
+++ team/kmoore/event_system_strip/funcs/func_presencestate.c Wed Jul 24 15:05:47 2013
@@ -41,7 +41,6 @@
#include "asterisk/app.h"
#ifdef TEST_FRAMEWORK
#include "asterisk/test.h"
-#include "asterisk/event.h"
#include <semaphore.h>
#endif
Modified: team/kmoore/event_system_strip/include/asterisk/event.h
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/event_system_strip/include/asterisk/event.h?view=diff&rev=395304&r1=395303&r2=395304
==============================================================================
--- team/kmoore/event_system_strip/include/asterisk/event.h (original)
+++ team/kmoore/event_system_strip/include/asterisk/event.h Wed Jul 24 15:05:47 2013
@@ -310,12 +310,6 @@
void ast_event_report_subs(const struct ast_event_sub *sub);
/*!
- * \brief Dump the event cache for the subscriber
- * \since 1.6.1
- */
-void ast_event_dump_cache(const struct ast_event_sub *event_sub);
-
-/*!
* \brief Create a new event
*
* \param event_type The type of event to create
@@ -402,46 +396,6 @@
int ast_event_queue_and_cache(struct ast_event *event);
/*!
- * \brief Retrieve an event from the cache
- *
- * \param ast_event_type The type of event to retrieve from the cache
- *
- * The rest of the arguments to this function specify information elements to
- * match for retrieving events from the cache. They are specified in the form:
- * \code
- * <enum ast_event_ie_type>, [enum ast_event_ie_pltype, [payload] ]
- * \endcode
- * and must end with AST_EVENT_IE_END.
- *
- * If the ie_type specified is *not* AST_EVENT_IE_END, then it must be followed
- * by a valid IE payload type. If the payload type specified is
- * AST_EVENT_IE_PLTYPE_EXISTS, then the 3rd argument should not be provided.
- * Otherwise, a payload must also be specified.
- *
- * \return A reference to an event retrieved from the cache. If no event was
- * found that matches the specified criteria, then NULL will be returned.
- *
- * \note If more than one event in the cache matches the specified criteria, only
- * one will be returned, and it is undefined which one it will be.
- *
- * \note The caller of this function *must* call ast_event_destroy() on the
- * returned event after it is done using it.
- *
- * Example Usage:
- *
- * \code
- * event = ast_event_get_cached(AST_EVENT_MWI,
- * AST_EVENT_IE_MAILBOX, AST_EVENT_IE_PLTYPE_STR, mailbox,
- * AST_EVENT_IE_END);
- * \endcode
- *
- * This example will check for an MWI event in the cache that matches the
- * specified mailbox. This would be the way to find out the last known state
- * of a mailbox without having to poll the mailbox directly.
- */
-struct ast_event *ast_event_get_cached(enum ast_event_type, ...);
-
-/*!
* \brief Append an information element that has a string payload
*
* \param event the event that the IE will be appended to
Modified: team/kmoore/event_system_strip/include/asterisk/event_defs.h
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/event_system_strip/include/asterisk/event_defs.h?view=diff&rev=395304&r1=395303&r2=395304
==============================================================================
--- team/kmoore/event_system_strip/include/asterisk/event_defs.h (original)
+++ team/kmoore/event_system_strip/include/asterisk/event_defs.h Wed Jul 24 15:05:47 2013
@@ -26,7 +26,7 @@
#define AST_EVENT_DEFS_H
/*! \brief Event types
- * \note These values can *never* change. */
+ * \note These values no longer go over the wire and can change when items are removed. */
enum ast_event_type {
/*! Reserved to provide the ability to subscribe to all events. A specific
* event should never have a payload of 0. */
@@ -36,32 +36,12 @@
* \note There are no "custom" IE types, because IEs only have to be
* unique to the event itself, not necessarily across all events. */
AST_EVENT_CUSTOM = 0x01,
- /*! Voicemail message waiting indication */
- AST_EVENT_MWI = 0x02,
/*! Someone has subscribed to events */
- AST_EVENT_SUB = 0x03,
- /*! Someone has unsubscribed from events */
- AST_EVENT_UNSUB = 0x04,
- /*! The aggregate state of a device across all servers configured to be
- * a part of a device state cluster has changed. */
- AST_EVENT_DEVICE_STATE = 0x05,
- /*! The state of a device has changed on _one_ server. This should not be used
- * directly, in general. Use AST_EVENT_DEVICE_STATE instead. */
- AST_EVENT_DEVICE_STATE_CHANGE = 0x06,
+ AST_EVENT_SUB = 0x02,
/*! Channel Event Logging events */
- AST_EVENT_CEL = 0x07,
- /*! A report of a security related event (see security_events.h) */
- AST_EVENT_SECURITY = 0x08,
- /*! Used by res_stun_monitor to alert listeners to an exernal network address change. */
- AST_EVENT_NETWORK_CHANGE = 0x09,
- /*! The presence state for a presence provider */
- AST_EVENT_PRESENCE_STATE = 0x0a,
- /*! Used to alert listeners when a named ACL has been changed. */
- AST_EVENT_ACL_CHANGE = 0x0b,
- /*! Send out a ping for debugging distributed events */
- AST_EVENT_PING = 0x0c,
+ AST_EVENT_CEL = 0x03,
/*! Number of event types. This should be the last event type + 1 */
- AST_EVENT_TOTAL = 0x0d,
+ AST_EVENT_TOTAL = 0x04,
};
/*! \brief Event Information Element types */
Modified: team/kmoore/event_system_strip/main/ccss.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/event_system_strip/main/ccss.c?view=diff&rev=395304&r1=395303&r2=395304
==============================================================================
--- team/kmoore/event_system_strip/main/ccss.c (original)
+++ team/kmoore/event_system_strip/main/ccss.c Wed Jul 24 15:05:47 2013
@@ -45,7 +45,6 @@
#include "asterisk/pbx.h"
#include "asterisk/utils.h"
#include "asterisk/taskprocessor.h"
-#include "asterisk/event.h"
#include "asterisk/devicestate.h"
#include "asterisk/module.h"
#include "asterisk/app.h"
Modified: team/kmoore/event_system_strip/main/devicestate.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/event_system_strip/main/devicestate.c?view=diff&rev=395304&r1=395303&r2=395304
==============================================================================
--- team/kmoore/event_system_strip/main/devicestate.c (original)
+++ team/kmoore/event_system_strip/main/devicestate.c Wed Jul 24 15:05:47 2013
@@ -131,7 +131,6 @@
#include "asterisk/app.h"
#include "asterisk/astobj2.h"
#include "asterisk/stasis.h"
-#include "asterisk/event.h"
#include "asterisk/devicestate.h"
#define DEVSTATE_TOPIC_BUCKETS 57
Modified: team/kmoore/event_system_strip/main/event.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/event_system_strip/main/event.c?view=diff&rev=395304&r1=395303&r2=395304
==============================================================================
--- team/kmoore/event_system_strip/main/event.c (original)
+++ team/kmoore/event_system_strip/main/event.c Wed Jul 24 15:05:47 2013
@@ -139,9 +139,6 @@
static AST_RWDLLIST_HEAD(ast_event_sub_list, ast_event_sub) ast_event_subs[AST_EVENT_TOTAL];
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);
#ifdef LOW_MEMORY
#define NUM_CACHE_BUCKETS 17
@@ -176,18 +173,6 @@
* \brief Event types that are kept in the cache.
*/
static struct cache_events ast_event_cache[AST_EVENT_TOTAL] = {
- [AST_EVENT_MWI] = {
- .hash_fn = ast_event_hash_mwi,
- .cache_args = { AST_EVENT_IE_MAILBOX, AST_EVENT_IE_CONTEXT },
- },
- [AST_EVENT_DEVICE_STATE] = {
- .hash_fn = ast_event_hash_devstate,
- .cache_args = { AST_EVENT_IE_DEVICE, },
- },
- [AST_EVENT_DEVICE_STATE_CHANGE] = {
- .hash_fn = ast_event_hash_devstate_change,
- .cache_args = { AST_EVENT_IE_DEVICE, AST_EVENT_IE_EID, },
- },
};
/*!
@@ -203,17 +188,8 @@
static const char * const event_names[AST_EVENT_TOTAL] = {
[AST_EVENT_ALL] = "All",
[AST_EVENT_CUSTOM] = "Custom",
- [AST_EVENT_MWI] = "MWI",
[AST_EVENT_SUB] = "Subscription",
- [AST_EVENT_UNSUB] = "Unsubscription",
- [AST_EVENT_DEVICE_STATE] = "DeviceState",
- [AST_EVENT_DEVICE_STATE_CHANGE] = "DeviceStateChange",
[AST_EVENT_CEL] = "CEL",
- [AST_EVENT_SECURITY] = "Security",
- [AST_EVENT_NETWORK_CHANGE] = "NetworkChange",
- [AST_EVENT_PRESENCE_STATE] = "PresenceState",
- [AST_EVENT_ACL_CHANGE] = "ACLChange",
- [AST_EVENT_PING] = "Ping",
};
struct ie_map {
@@ -645,38 +621,6 @@
return 0;
}
-static int dump_cache_cb(void *obj, void *arg, int flags)
-{
- const struct ast_event_ref *event_ref = obj;
- const struct ast_event *event = event_ref->event;
- const struct ast_event_sub *event_sub = arg;
- struct ast_event_ie_val *ie_val = NULL;
-
- AST_LIST_TRAVERSE(&event_sub->ie_vals, ie_val, entry) {
- if (!match_ie_val(event, ie_val, NULL)) {
- break;
- }
- }
-
- if (!ie_val) {
- /* All parameters were matched on this cache entry, so dump it */
- event_sub->cb(event, event_sub->userdata);
- }
-
- return 0;
-}
-
-/*! \brief Dump the event cache for the subscribed event type */
-void ast_event_dump_cache(const struct ast_event_sub *event_sub)
-{
- if (!ast_event_cache[event_sub->type].container) {
- return;
- }
-
- ao2_callback(ast_event_cache[event_sub->type].container, OBJ_NODATA,
- dump_cache_cb, (void *) event_sub);
-}
-
static struct ast_event *gen_sub_event(struct ast_event_sub *sub)
{
struct ast_event_ie_val *ie_val;
@@ -1006,25 +950,10 @@
struct ast_event_sub *ast_event_unsubscribe(struct ast_event_sub *sub)
{
- struct ast_event *event;
AST_RWDLLIST_WRLOCK(&ast_event_subs[sub->type]);
AST_DLLIST_REMOVE(&ast_event_subs[sub->type], sub, entry);
AST_RWDLLIST_UNLOCK(&ast_event_subs[sub->type]);
-
- if (ast_event_check_subscriber(AST_EVENT_UNSUB,
- AST_EVENT_IE_EVENTTYPE, AST_EVENT_IE_PLTYPE_UINT, sub->type,
- AST_EVENT_IE_END) != AST_EVENT_SUB_NONE) {
-
- event = ast_event_new(AST_EVENT_UNSUB,
- AST_EVENT_IE_UNIQUEID, AST_EVENT_IE_PLTYPE_UINT, sub->uniqueid,
- AST_EVENT_IE_EVENTTYPE, AST_EVENT_IE_PLTYPE_UINT, sub->type,
- AST_EVENT_IE_DESCRIPTION, AST_EVENT_IE_PLTYPE_STR, sub->description,
- AST_EVENT_IE_END);
- if (event && ast_event_queue(event)) {
- ast_event_destroy(event);
- }
- }
ast_event_sub_destroy(sub);
@@ -1349,83 +1278,6 @@
}
memcpy(dup_event, event, event_len);
-
- return dup_event;
-}
-
-struct ast_event *ast_event_get_cached(enum ast_event_type type, ...)
-{
- va_list ap;
- enum ast_event_ie_type ie_type;
- struct ast_event *dup_event = NULL;
- struct ast_event_ref *cached_event_ref;
- struct ast_event *cache_arg_event;
- struct ast_event_ref tmp_event_ref = {
- .event = NULL,
- };
- struct ao2_container *container = NULL;
-
- if (type >= AST_EVENT_TOTAL) {
- ast_log(LOG_ERROR, "%u is an invalid type!\n", type);
- return NULL;
- }
-
- if (!(container = ast_event_cache[type].container)) {
- ast_log(LOG_ERROR, "%u is not a cached event type\n", type);
- return NULL;
- }
-
- if (!(cache_arg_event = ast_event_new(type, AST_EVENT_IE_END))) {
- return NULL;
- }
-
- va_start(ap, type);
- for (ie_type = va_arg(ap, enum ast_event_ie_type);
- ie_type != AST_EVENT_IE_END;
- ie_type = va_arg(ap, enum ast_event_ie_type))
- {
- enum ast_event_ie_pltype ie_pltype;
-
- ie_pltype = va_arg(ap, enum ast_event_ie_pltype);
-
- switch (ie_pltype) {
- case AST_EVENT_IE_PLTYPE_UINT:
- ast_event_append_ie_uint(&cache_arg_event, ie_type, va_arg(ap, uint32_t));
- break;
- case AST_EVENT_IE_PLTYPE_BITFLAGS:
- ast_event_append_ie_bitflags(&cache_arg_event, ie_type, va_arg(ap, uint32_t));
- break;
- case AST_EVENT_IE_PLTYPE_STR:
- ast_event_append_ie_str(&cache_arg_event, ie_type, va_arg(ap, const char *));
- break;
- case AST_EVENT_IE_PLTYPE_RAW:
- {
- void *data = va_arg(ap, void *);
- size_t datalen = va_arg(ap, size_t);
- ast_event_append_ie_raw(&cache_arg_event, ie_type, data, datalen);
- break;
- }
- case AST_EVENT_IE_PLTYPE_EXISTS:
- ast_log(LOG_WARNING, "PLTYPE_EXISTS not supported by this function\n");
- break;
- case AST_EVENT_IE_PLTYPE_UNKNOWN:
- break;
- }
- }
- va_end(ap);
-
- tmp_event_ref.event = cache_arg_event;
-
- cached_event_ref = ao2_find(container, &tmp_event_ref, OBJ_POINTER);
-
- ast_event_destroy(cache_arg_event);
- cache_arg_event = NULL;
-
- if (cached_event_ref) {
- dup_event = ast_event_dup(cached_event_ref->event);
- ao2_ref(cached_event_ref, -1);
- cached_event_ref = NULL;
- }
return dup_event;
}
@@ -1568,47 +1420,6 @@
return _ast_event_queue(event, 1);
}
-static int ast_event_hash_mwi(const void *obj, const int flags)
-{
- const struct ast_event *event = obj;
- const char *mailbox = ast_event_get_ie_str(event, AST_EVENT_IE_MAILBOX);
- const char *context = ast_event_get_ie_str(event, AST_EVENT_IE_CONTEXT);
-
- return ast_str_hash_add(context, ast_str_hash(mailbox));
-}
-
-/*!
- * \internal
- * \brief Hash function for AST_EVENT_DEVICE_STATE
- *
- * \param[in] obj an ast_event
- * \param[in] flags unused
- *
- * \return hash value
- */
-static int ast_event_hash_devstate(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_DEVICE));
-}
-
-/*!
- * \internal
- * \brief Hash function for AST_EVENT_DEVICE_STATE_CHANGE
- *
- * \param[in] obj an ast_event
- * \param[in] flags unused
- *
- * \return hash value
- */
-static int ast_event_hash_devstate_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_DEVICE));
-}
-
static int ast_event_hash(const void *obj, const int flags)
{
const struct ast_event_ref *event_ref;
Modified: team/kmoore/event_system_strip/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/event_system_strip/main/manager.c?view=diff&rev=395304&r1=395303&r2=395304
==============================================================================
--- team/kmoore/event_system_strip/main/manager.c (original)
+++ team/kmoore/event_system_strip/main/manager.c Wed Jul 24 15:05:47 2013
@@ -87,7 +87,6 @@
#include "asterisk/astobj2.h"
#include "asterisk/features.h"
#include "asterisk/security_events.h"
-#include "asterisk/event.h"
#include "asterisk/aoc.h"
#include "asterisk/strings.h"
#include "asterisk/stringfields.h"
Modified: team/kmoore/event_system_strip/main/pbx.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/event_system_strip/main/pbx.c?view=diff&rev=395304&r1=395303&r2=395304
==============================================================================
--- team/kmoore/event_system_strip/main/pbx.c (original)
+++ team/kmoore/event_system_strip/main/pbx.c Wed Jul 24 15:05:47 2013
@@ -64,7 +64,6 @@
#include "asterisk/app.h"
#include "asterisk/devicestate.h"
#include "asterisk/presencestate.h"
-#include "asterisk/event.h"
#include "asterisk/hashtab.h"
#include "asterisk/module.h"
#include "asterisk/indications.h"
Modified: team/kmoore/event_system_strip/main/presencestate.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/event_system_strip/main/presencestate.c?view=diff&rev=395304&r1=395303&r2=395304
==============================================================================
--- team/kmoore/event_system_strip/main/presencestate.c (original)
+++ team/kmoore/event_system_strip/main/presencestate.c Wed Jul 24 15:05:47 2013
@@ -36,7 +36,6 @@
#include "asterisk/presencestate.h"
#include "asterisk/pbx.h"
#include "asterisk/app.h"
-#include "asterisk/event.h"
/*! \brief Device state strings for printing */
static const struct {
Modified: team/kmoore/event_system_strip/res/parking/parking_applications.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/event_system_strip/res/parking/parking_applications.c?view=diff&rev=395304&r1=395303&r2=395304
==============================================================================
--- team/kmoore/event_system_strip/res/parking/parking_applications.c (original)
+++ team/kmoore/event_system_strip/res/parking/parking_applications.c Wed Jul 24 15:05:47 2013
@@ -30,7 +30,6 @@
#include "res_parking.h"
#include "asterisk/config.h"
#include "asterisk/config_options.h"
-#include "asterisk/event.h"
#include "asterisk/utils.h"
#include "asterisk/astobj2.h"
#include "asterisk/features.h"
Modified: team/kmoore/event_system_strip/res/parking/parking_manager.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/event_system_strip/res/parking/parking_manager.c?view=diff&rev=395304&r1=395303&r2=395304
==============================================================================
--- team/kmoore/event_system_strip/res/parking/parking_manager.c (original)
+++ team/kmoore/event_system_strip/res/parking/parking_manager.c Wed Jul 24 15:05:47 2013
@@ -30,7 +30,6 @@
#include "res_parking.h"
#include "asterisk/config.h"
#include "asterisk/config_options.h"
-#include "asterisk/event.h"
#include "asterisk/utils.h"
#include "asterisk/module.h"
#include "asterisk/cli.h"
Modified: team/kmoore/event_system_strip/res/parking/parking_ui.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/event_system_strip/res/parking/parking_ui.c?view=diff&rev=395304&r1=395303&r2=395304
==============================================================================
--- team/kmoore/event_system_strip/res/parking/parking_ui.c (original)
+++ team/kmoore/event_system_strip/res/parking/parking_ui.c Wed Jul 24 15:05:47 2013
@@ -30,7 +30,6 @@
#include "res_parking.h"
#include "asterisk/config.h"
#include "asterisk/config_options.h"
-#include "asterisk/event.h"
#include "asterisk/utils.h"
#include "asterisk/module.h"
#include "asterisk/cli.h"
Modified: team/kmoore/event_system_strip/res/res_jabber.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/event_system_strip/res/res_jabber.c?view=diff&rev=395304&r1=395303&r2=395304
==============================================================================
--- team/kmoore/event_system_strip/res/res_jabber.c (original)
+++ team/kmoore/event_system_strip/res/res_jabber.c Wed Jul 24 15:05:47 2013
@@ -70,7 +70,6 @@
#include "asterisk/astobj.h"
#include "asterisk/astdb.h"
#include "asterisk/manager.h"
-#include "asterisk/event.h"
#include "asterisk/devicestate.h"
#include "asterisk/message.h"
@@ -3335,7 +3334,6 @@
int oldmsgs, newmsgs;
iks *item, *item_content;
struct ast_eid pubsub_eid;
- struct ast_event *event;
unsigned int cachable = AST_DEVSTATE_CACHABLE;
item = iks_find(iks_find(iks_find(pak->x, "event"), "items"), "item");
@@ -3372,12 +3370,6 @@
ast_debug(1, "Don't know how to handle PubSub event of type %s\n",
iks_name(item_content));
return IKS_FILTER_EAT;
- }
-
- if (cachable == AST_DEVSTATE_CACHABLE) {
- ast_event_queue_and_cache(event);
- } else {
- ast_event_queue(event);
}
return IKS_FILTER_EAT;
Modified: team/kmoore/event_system_strip/res/res_parking.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/event_system_strip/res/res_parking.c?view=diff&rev=395304&r1=395303&r2=395304
==============================================================================
--- team/kmoore/event_system_strip/res/res_parking.c (original)
+++ team/kmoore/event_system_strip/res/res_parking.c Wed Jul 24 15:05:47 2013
@@ -184,7 +184,6 @@
#include "parking/res_parking.h"
#include "asterisk/config.h"
#include "asterisk/config_options.h"
-#include "asterisk/event.h"
#include "asterisk/utils.h"
#include "asterisk/module.h"
#include "asterisk/cli.h"
Modified: team/kmoore/event_system_strip/res/res_xmpp.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/event_system_strip/res/res_xmpp.c?view=diff&rev=395304&r1=395303&r2=395304
==============================================================================
--- team/kmoore/event_system_strip/res/res_xmpp.c (original)
+++ team/kmoore/event_system_strip/res/res_xmpp.c Wed Jul 24 15:05:47 2013
@@ -59,7 +59,6 @@
#include "asterisk/app.h"
#include "asterisk/message.h"
#include "asterisk/manager.h"
-#include "asterisk/event.h"
#include "asterisk/cli.h"
#include "asterisk/config_options.h"
@@ -1455,7 +1454,6 @@
int oldmsgs, newmsgs;
iks *item, *item_content;
struct ast_eid pubsub_eid;
- struct ast_event *event;
unsigned int cachable = AST_DEVSTATE_CACHABLE;
item = iks_find(iks_find(iks_find(pak->x, "event"), "items"), "item");
if (!item) {
@@ -1491,12 +1489,6 @@
ast_debug(1, "Don't know how to handle PubSub event of type %s\n",
iks_name(item_content));
return IKS_FILTER_EAT;
- }
-
- if (cachable == AST_DEVSTATE_CACHABLE) {
- ast_event_queue_and_cache(event);
- } else {
- ast_event_queue(event);
}
return IKS_FILTER_EAT;
Modified: team/kmoore/event_system_strip/tests/test_event.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/event_system_strip/tests/test_event.c?view=diff&rev=395304&r1=395303&r2=395304
==============================================================================
--- team/kmoore/event_system_strip/tests/test_event.c (original)
+++ team/kmoore/event_system_strip/tests/test_event.c Wed Jul 24 15:05:47 2013
@@ -26,9 +26,7 @@
*
* \todo API Calls not yet touched by a test: XXX TODO
* - ast_event_queue_and_cache()
- * - ast_event_get_cached()
* - ast_event_report_subs()
- * - ast_event_dump_cache()
* - ast_event_get_ie_type_name()
* - ast_event_get_ie_pltype()
* - ast_event_str_to_event_type()
More information about the svn-commits
mailing list