]> git.ipfire.org Git - thirdparty/asterisk.git/commit
autoservice: Do not sleep if autoservice_stop is called within autoservice thread
authorAlexei Gradinari <alex2grad@gmail.com>
Wed, 4 Sep 2024 14:28:57 +0000 (10:28 -0400)
committerAlexei Gradinari <alex2grad@gmail.com>
Mon, 9 Sep 2024 23:17:15 +0000 (23:17 +0000)
commitb11b1f611ce847d61c006296af8e0395244c11bc
treec5db7c6a1695e4a6b951a57e399363230eb21e11
parentaf3113d5c86f7850ef5915dfc657c47a0ceb6f3d
autoservice: Do not sleep if autoservice_stop is called within autoservice thread

It's possible that ast_autoservice_stop is called within the autoservice thread.
In this case the autoservice thread is stuck in an endless sleep.

To avoid endless sleep ast_autoservice_stop must check that it's not called
within the autoservice thread.

Fixes: #763
main/autoservice.c