From: Mark Murawski Date: Wed, 6 Oct 2021 00:59:05 +0000 (-0400) Subject: pbx_ael: Fix crash and lockup issue regarding 'ael reload' X-Git-Tag: 16.21.1~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99cd15cfa1e5e8b6ec2626506f4f1638bd47329f;p=thirdparty%2Fasterisk.git pbx_ael: Fix crash and lockup issue regarding 'ael reload' Avoid infinite recursion and crash Change-Id: I8ed05ec3aa2806c50c77edc5dd0cd4e4fa08b3f4 (cherry picked from commit 4cd2679c5ed52c07903c305bb61e9f863100f12e) --- diff --git a/pbx/pbx_ael.c b/pbx/pbx_ael.c index 8bf3af0a8e..ed1c23d3fb 100644 --- a/pbx/pbx_ael.c +++ b/pbx/pbx_ael.c @@ -280,13 +280,8 @@ static int load_module(void) static int reload(void) { -#ifndef STANDALONE - /* Lock-Protected reload. It is VERY BAD to have simultaneous ael pbx_load_module() executing at the same time */ - return ast_module_reload("pbx_ael") == AST_MODULE_RELOAD_SUCCESS ? AST_MODULE_LOAD_SUCCESS : AST_MODULE_LOAD_DECLINE; -#else - /* Lock-Protected reload not needed (and not available) when running standalone (Example: via aelparse cli tool). No reload contention is possible */ + /* Lock-Protected reload not needed because we're already being called from ast_module_reload() */ return pbx_load_module(); -#endif } #ifdef STANDALONE