diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-08-10 16:24:11 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-08-10 16:24:11 +0000 |
commit | 58d5edca86dbec98b948cfece8a995e5fb2a7366 (patch) | |
tree | fc67d9e42c9d0e43f71e39bb24d4b2edc06ac7a0 /funcs | |
parent | 09a83ce0a8102c40c0f9ef44d310032bf30a28c1 (diff) |
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: http://svn.digium.com/svn/asterisk/trunk@79027 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs')
-rw-r--r-- | funcs/func_devstate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/funcs/func_devstate.c b/funcs/func_devstate.c index 6c3d8e932..f1fad0ae5 100644 --- a/funcs/func_devstate.c +++ b/funcs/func_devstate.c @@ -86,7 +86,7 @@ static int devstate_write(struct ast_channel *chan, const char *cmd, char *data, AST_RWLIST_INSERT_HEAD(&custom_devices, dev, entry); } dev->state = ast_devstate_val(value); - ast_device_state_changed("Custom:%s", dev->name); + ast_devstate_changed(dev->state, "Custom:%s", dev->name); AST_RWLIST_UNLOCK(&custom_devices); return 0; |