]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
app_reload: Fix Reload() without arguments.
authorNaveen Albert <asterisk@phreaknet.org>
Mon, 17 Nov 2025 21:14:16 +0000 (16:14 -0500)
committergithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Wed, 19 Nov 2025 17:19:56 +0000 (17:19 +0000)
Calling Reload() without any arguments is supposed to reload
everything (equivalent to a 'core reload'), but actually does
nothing. This is because it was calling ast_module_reload with
an empty string, and the argument needs to explicitly be NULL.

Resolves: #1597

apps/app_reload.c

index 647edfb922d0318b010cfb2999d038121c6db423..0844ce0d3a264e5b61ccacac6bc06015cdaf2de7 100644 (file)
@@ -85,7 +85,7 @@ static int reload_exec(struct ast_channel *chan, const char *data)
        targets = ast_strdupa(data);
        ast_autoservice_start(chan);
        if (ast_strlen_zero(targets)) { /* Reload everything */
-               res = ast_module_reload(targets);
+               res = ast_module_reload(NULL);
        } else {
                while((target = ast_strsep(&targets, ',', AST_STRSEP_ALL))) {
                        res |= ast_module_reload(target);