]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
bridge_simple: Increase code verbosity for clarity.
authorSean Bright <sean@seanbright.com>
Fri, 7 Nov 2025 22:17:28 +0000 (17:17 -0500)
committergithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Wed, 12 Nov 2025 22:05:08 +0000 (22:05 +0000)
There's no actual problem here, but I can see how it might by
confusing.

Resolves: #1444

bridges/bridge_simple.c

index 4e27b9f5409211da4af7f87556adedee3b512b0c..a7ce3a000c6d32b9dbdf362bcb431b3ad12c1acd 100644 (file)
@@ -157,11 +157,13 @@ static int simple_bridge_join(struct ast_bridge *bridge, struct ast_bridge_chann
        /* The ast_channel_hold_state() and ast_channel_name() accessors need to be
         * called with the associated channel lock held.
         */
-       if ((unhold_c1 = ast_channel_hold_state(c1) == AST_CONTROL_HOLD)) {
+       unhold_c1 = (ast_channel_hold_state(c1) == AST_CONTROL_HOLD);
+       if (unhold_c1) {
                ast_debug(1, "Channel %s simulating UNHOLD for bridge simple join.\n", ast_channel_name(c1));
        }
 
-       if ((unhold_c0 = ast_channel_hold_state(c0) == AST_CONTROL_HOLD)) {
+       unhold_c0 = (ast_channel_hold_state(c0) == AST_CONTROL_HOLD);
+       if (unhold_c0) {
                ast_debug(1, "Channel %s simulating UNHOLD for bridge simple join.\n", ast_channel_name(c0));
        }