]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_stasis_device_state: Fix delete ARI Devicestates after asterisk restart.
authorJose Lopes <jose.lopes@nfon.com>
Wed, 30 Jul 2025 12:49:16 +0000 (13:49 +0100)
committergithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Mon, 18 Aug 2025 14:53:23 +0000 (14:53 +0000)
After an asterisk restart, the deletion of ARI Devicestates didn't
return error, but the devicestate was not deleted.
Found a typo on populate_cache function that created wrong cache for
device states.
This bug caused wrong assumption that devicestate didn't exist,
since it was not in cache, so deletion didn't returned error.

Fixes: #1327
res/res_stasis_device_state.c

index b527c140868c82c1ac009461cee986d07c77ed06..01fe71ff19a7bdfd4fece979babcb8b7e9085c72 100644 (file)
@@ -283,7 +283,7 @@ static void populate_cache(void)
                if (!ast_strlen_zero(name)) {
                        ast_devstate_changed(
                                ast_devstate_val(entry->data),
-                               AST_DEVSTATE_CACHABLE, "%s%s\n",
+                               AST_DEVSTATE_CACHABLE, "%s%s",
                                DEVICE_STATE_SCHEME_STASIS, name + 1);
                }
        }