[asterisk-commits] russell: branch russell/events r80236 - in /team/russell/events: apps/ includ...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Aug 21 22:33:46 CDT 2007
Author: russell
Date: Tue Aug 21 22:33:45 2007
New Revision: 80236
URL: http://svn.digium.com/view/asterisk?view=rev&rev=80236
Log:
Change the DEVICE event IE type to NAME so that it is more generic and can be
reused by more events
Modified:
team/russell/events/apps/app_queue.c
team/russell/events/include/asterisk/event_defs.h
team/russell/events/main/devicestate.c
team/russell/events/main/pbx.c
Modified: team/russell/events/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/russell/events/apps/app_queue.c?view=diff&rev=80236&r1=80235&r2=80236
==============================================================================
--- team/russell/events/apps/app_queue.c (original)
+++ team/russell/events/apps/app_queue.c Tue Aug 21 22:33:45 2007
@@ -680,7 +680,7 @@
const char *device;
state = ast_event_get_ie_uint(event, AST_EVENT_IE_STATE);
- device = ast_event_get_ie_str(event, AST_EVENT_IE_DEVICE);
+ device = ast_event_get_ie_str(event, AST_EVENT_IE_NAME);
if (ast_strlen_zero(device)) {
ast_log(LOG_ERROR, "Received invalid event that had no device IE\n");
Modified: team/russell/events/include/asterisk/event_defs.h
URL: http://svn.digium.com/view/asterisk/team/russell/events/include/asterisk/event_defs.h?view=diff&rev=80236&r1=80235&r2=80236
==============================================================================
--- team/russell/events/include/asterisk/event_defs.h (original)
+++ team/russell/events/include/asterisk/event_defs.h Tue Aug 21 22:33:45 2007
@@ -44,8 +44,10 @@
AST_EVENT_UNSUB = 0x04,
/*! The state of a device has changed */
AST_EVENT_DEVICE_STATE = 0x05,
+ /*! This is a user generated event */
+ AST_EVENT_USER_EVENT = 0x06,
/*! Number of event types. This should be the last event type + 1 */
- AST_EVENT_TOTAL = 0x06,
+ AST_EVENT_TOTAL = 0x07,
};
/*! \brief Event Information Element types */
@@ -91,10 +93,10 @@
AST_EVENT_IE_EXISTS = 0x06,
/*!
* \brief Device Name
- * Used by AST_EVENT_DEVICE_STATE
+ * Used by AST_EVENT_DEVICE_STATE,
* Payload type: STR
*/
- AST_EVENT_IE_DEVICE = 0x07,
+ AST_EVENT_IE_NAME = 0x07,
/*!
* \brief Generic State IE
* Used by AST_EVENT_DEVICE_STATE
Modified: team/russell/events/main/devicestate.c
URL: http://svn.digium.com/view/asterisk/team/russell/events/main/devicestate.c?view=diff&rev=80236&r1=80235&r2=80236
==============================================================================
--- team/russell/events/main/devicestate.c (original)
+++ team/russell/events/main/devicestate.c Tue Aug 21 22:33:45 2007
@@ -279,7 +279,7 @@
struct ast_event *event;
event = ast_event_get_cached(AST_EVENT_DEVICE_STATE,
- AST_EVENT_IE_DEVICE, AST_EVENT_IE_PLTYPE_STR, device,
+ AST_EVENT_IE_NAME, AST_EVENT_IE_PLTYPE_STR, device,
AST_EVENT_IE_END);
if (!event)
@@ -409,7 +409,7 @@
struct ast_event *event;
if (!(event = ast_event_new(AST_EVENT_DEVICE_STATE,
- AST_EVENT_IE_DEVICE, AST_EVENT_IE_PLTYPE_STR, device,
+ AST_EVENT_IE_NAME, AST_EVENT_IE_PLTYPE_STR, device,
AST_EVENT_IE_STATE, AST_EVENT_IE_PLTYPE_UINT, state,
AST_EVENT_IE_END))) {
return;
@@ -419,7 +419,7 @@
/* Cache this event, replacing an event in the cache with the same
* device name if it exists. */
ast_event_queue_and_cache(event,
- AST_EVENT_IE_DEVICE, AST_EVENT_IE_PLTYPE_STR,
+ AST_EVENT_IE_NAME, AST_EVENT_IE_PLTYPE_STR,
AST_EVENT_IE_END);
} else {
ast_event_queue(event);
Modified: team/russell/events/main/pbx.c
URL: http://svn.digium.com/view/asterisk/team/russell/events/main/pbx.c?view=diff&rev=80236&r1=80235&r2=80236
==============================================================================
--- team/russell/events/main/pbx.c (original)
+++ team/russell/events/main/pbx.c Tue Aug 21 22:33:45 2007
@@ -6013,7 +6013,7 @@
{
const char *device;
- device = ast_event_get_ie_str(event, AST_EVENT_IE_DEVICE);
+ device = ast_event_get_ie_str(event, AST_EVENT_IE_NAME);
if (ast_strlen_zero(device)) {
ast_log(LOG_ERROR, "Received invalid event that had no device IE\n");
return;
More information about the asterisk-commits
mailing list