Merge major changes to the way device state is passed around Asterisk. The two
authorRussell Bryant <russell@russellbryant.com>
Fri, 1 Jun 2007 23:34:43 +0000 (23:34 +0000)
committerRussell Bryant <russell@russellbryant.com>
Fri, 1 Jun 2007 23:34:43 +0000 (23:34 +0000)
commit605368649ef8280e3b52a45a80fd30562a767af3
treeca2f21d45b7f24e39079d1aec0006a66cad40dec
parentc9cf12b6758eba923746fc47e36b9684ac593944
Merge major changes to the way device state is passed around Asterisk.  The two
places that cared about device states were app_queue and the hint code in pbx.c.
The changes include converting it to use the Asterisk event system, as well as
other efficiency improvements.
 * app_queue: This module used to register a callback into devicestate.c to
   monitor device state changes.  Now, it is just a subscriber to Asterisk
   events with the type, device state.
 * pbx.c hints: Previously, the device state processing thread in devicestate.c
   would call ast_hint_state_changed() each time the state of a device changed.
   Then, that code would go looking for all the hints that monitor that device,
   and call their callbacks.  All of this blocked the device state processing
   thread.  Now, the hint code is a subscriber of Asterisk events with the
   type, device state.  Furthermore, when this code receives a device state
   change event, it queues it up to be processed by another thread so that it
   doesn't block one of the event processing threads.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@66958 65c4cc65-6c06-0410-ace0-fbb531ad65f3
apps/app_queue.c
include/asterisk.h
include/asterisk/devicestate.h
include/asterisk/event_defs.h
include/asterisk/pbx.h
main/asterisk.c
main/devicestate.c
main/pbx.c