mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 03:50:31 +00:00
chan_sip.c: Fix registration timeout and expire deadlock potential.
This patch is part of a series to resolve deadlocks in chan_sip.c. Stopping a scheduled event can result in a deadlock if the scheduled event is running when you try to stop the event. If you hold a lock needed by the scheduled event while trying to stop the scheduled event then a deadlock can happen. The general strategy for resolving the deadlock potential is to push the actual starting and stopping of the scheduled events off onto the scheduler/do_monitor() thread by scheduling an immediate one shot scheduled event. Some restructuring may be needed because the code may assume that the start/stop of the scheduled events is immediate. ASTERISK-25023 Change-Id: I2e40de89efc8ae6e8850771d089ca44bc604b508
This commit is contained in:
@@ -547,8 +547,7 @@ enum sipregistrystate {
|
||||
* recover (not sure how correctly).
|
||||
*/
|
||||
|
||||
REG_STATE_TIMEOUT, /*!< Registration timed out
|
||||
* \note XXX unused */
|
||||
REG_STATE_TIMEOUT, /*!< Registration about to expire, renewing registration */
|
||||
|
||||
REG_STATE_NOAUTH, /*!< We have no accepted credentials
|
||||
* \note fatal - no chance to proceed */
|
||||
|
Reference in New Issue
Block a user