Merge a set of device state improvements from team/russell/events.

The way a device state change propagates is kind of silly, in my opinion.  A
device state provider calls a function that indicates that the state of a
device has changed.  Then, another thread goes back and calls a callback for
the device state provider to find out what the new state is before it can go
send it off to whoever cares.

I have changed it so that you can include the state that the device has changed
to in the first function call from the device state provider.  This removes the
need to have to call the callback, which locks up critical containers to go find
out what the state changed to.

This change set changes the "simple" device state providers to use the new method.
This includes parking, meetme, and SLA.

I have also mostly converted chan_agent in my branch, but still have some more
things to think through before presenting the plan for converting channel drivers
to ensure all of the right events get generated ...


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79027 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2007-08-10 16:24:11 +00:00
parent fef7773d0b
commit e113d36aa4
6 changed files with 212 additions and 71 deletions

View File

@@ -35,7 +35,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/utils.h"
#define NUM_EVENT_THREADS 5
/* Only use one thread for now to ensure ordered delivery */
#define NUM_EVENT_THREADS 1
struct ast_event_ie {
enum ast_event_ie_type ie_type:16;