]> 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)
committerAsterisk Development Team <asteriskteam@digium.com>
Thu, 12 Sep 2024 18:46:48 +0000 (18:46 +0000)
commita06c18e8bd9af1edcbbe8f914159d97581197b7e
tree5e4549d3266086b1a452cef5f72d0f0229195064
parentb506faaa2d6674a11e351842ba1d1cd846a6c244
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
(cherry picked from commit 6c5c1e5426aa51601fd4e893234cd57968114154)
main/autoservice.c