]> git.ipfire.org Git - thirdparty/asterisk.git/commit
pbx_config.c: Don't crash when unloading module.
authorSean Bright <sean@seanbright.com>
Sat, 2 Dec 2023 16:13:31 +0000 (11:13 -0500)
committerasterisk-org-access-app[bot] <120671045+asterisk-org-access-app[bot]@users.noreply.github.com>
Wed, 6 Dec 2023 21:24:50 +0000 (21:24 +0000)
commit1920639eab0572d875a07b0c1caaf7fb22fe9ba7
tree731385b1699c0ef1b896742094684c78cfafd425
parent1a0acabb8ac948bc7e97ba43eef3ef1ad968758c
pbx_config.c: Don't crash when unloading module.

`pbx_config` subscribes to manager events to capture the `FullyBooted`
event but fails to unsubscribe if the module is loaded after that
event fires. If the module is unloaded, a crash occurs the next time a
manager event is raised.

We now unsubscribe when the module is unloaded if we haven't already
unsubscribed.

Fixes #470
pbx/pbx_config.c