From: George Joseph Date: Thu, 8 Aug 2024 16:57:14 +0000 (-0600) Subject: manager.c: Fix FRACK when doing CoreShowChannelMap in DEVMODE X-Git-Tag: 20.10.0-rc1~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eaf24e01fb3b2b24fe83886684d796b249013753;p=thirdparty%2Fasterisk.git manager.c: Fix FRACK when doing CoreShowChannelMap in DEVMODE If you run an AMI CoreShowChannelMap on a channel that isn't in a bridge and you're in DEVMODE, you can get a FRACK because the bridge id is empty. We now simply return an empty list for that request. (cherry picked from commit d491d419501213b276bc967de03fd37e78561d59) --- diff --git a/main/manager.c b/main/manager.c index 2ce88a3ab8..a9bc52e5fd 100644 --- a/main/manager.c +++ b/main/manager.c @@ -7313,6 +7313,13 @@ static int action_coreshowchannelmap(struct mansession *s, const struct message return 0; } + if (ast_strlen_zero(channel_snapshot->bridge->id)) { + astman_send_listack(s, m, "Channel map will follow", "start"); + astman_send_list_complete_start(s, m, "CoreShowChannelMapComplete", 0); + astman_send_list_complete_end(s); + return 0; + } + bridge_snapshot = ast_bridge_get_snapshot_by_uniqueid(channel_snapshot->bridge->id); if (!bridge_snapshot) { astman_send_listack(s, m, "Channel map will follow", "start");