list of extension state updates for the dialog list. More...
Data Fields | |
struct sip_extenstate_update * | first |
struct sip_extenstate_update * | last |
ast_mutex_t | lock |
list of extension state updates for the dialog list.
When an endpoint SUBSCRIBES to the state of a hint a callback function is registered with the Asterisk core. That callback is used to notify chan_sip every time that hint's state changes and what endpoint we need to update. The problem occurs with the locking order used during that callback function. When the function is used by the Asterisk core, the global contexts lock is held. Then within the callback the sip_pvt lock is held. That completely invalidates the locking order used everywhere else in chan_sip regarding these two locks. Typically the pvt lock is held while we ask the Asterisk core about an extension and context which results in the context being locked. In order to avoid the possible deadlock that could occur in the callback function due to improper locking, this list was created to queue those state changes for the sip_pvt to read outside of that thread. This way the context lock never has to be held before the pvt lock is held.
Definition at line 1303 of file chan_sip.c.
struct sip_extenstate_update* first [read] |
Definition at line 1303 of file chan_sip.c.
struct sip_extenstate_update* last [read] |
Definition at line 1303 of file chan_sip.c.
Definition at line 1303 of file chan_sip.c.