]> 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:13 +0000 (23:17 +0000)
commit9b3d3a7f0ead3132ba1ee47f80ad6b01c968e1e6
treef714c3a10896477d5c38735af5fa1772a763f066
parentdba0af73492248e9bd7c8c284358c36d4965527c
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