From 1e84bcc8ecc9325e792481f0cba39e2d67af0c34 Mon Sep 17 00:00:00 2001 From: Jose Lopes Date: Wed, 30 Jul 2025 13:49:16 +0100 Subject: [PATCH] res_stasis_device_state: Fix delete ARI Devicestates after asterisk restart. 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 (cherry picked from commit 7c73bb235e8d9a5fc338398ad33b5934cbbbbc01) --- res/res_stasis_device_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/res_stasis_device_state.c b/res/res_stasis_device_state.c index b527c14086..01fe71ff19 100644 --- a/res/res_stasis_device_state.c +++ b/res/res_stasis_device_state.c @@ -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); } }