summaryrefslogtreecommitdiff
path: root/funcs/func_devstate.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2007-08-10 16:24:11 +0000
committerRussell Bryant <russell@russellbryant.com>2007-08-10 16:24:11 +0000
commite113d36aa4052a9f102fbac687f16bf9bf6096de (patch)
treefc67d9e42c9d0e43f71e39bb24d4b2edc06ac7a0 /funcs/func_devstate.c
parentfef7773d0b802f4330999923bcd0a353a6f7ee31 (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: https://origsvn.digium.com/svn/asterisk/trunk@79027 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'funcs/func_devstate.c')
-rw-r--r--funcs/func_devstate.c2
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;