Deprecated macro usage for connected line, redirecting, and CCSS
[asterisk/asterisk.git] / main / rtp_engine.c
index d60790c..e739c70 100644 (file)
@@ -917,12 +917,14 @@ static enum ast_bridge_result local_bridge_loop(struct ast_channel *c0, struct a
                                }
                                ast_frfree(fr);
                        } else if (fr->subclass.integer == AST_CONTROL_CONNECTED_LINE) {
-                               if (ast_channel_connected_line_macro(who, other, fr, other == c0, 1)) {
+                               if (ast_channel_connected_line_sub(who, other, fr, 1) &&
+                                       ast_channel_connected_line_macro(who, other, fr, other == c0, 1)) {
                                        ast_indicate_data(other, fr->subclass.integer, fr->data.ptr, fr->datalen);
                                }
                                ast_frfree(fr);
                        } else if (fr->subclass.integer == AST_CONTROL_REDIRECTING) {
-                               if (ast_channel_redirecting_macro(who, other, fr, other == c0, 1)) {
+                               if (ast_channel_redirecting_sub(who, other, fr, 1) &&
+                                       ast_channel_redirecting_macro(who, other, fr, other == c0, 1)) {
                                        ast_indicate_data(other, fr->subclass.integer, fr->data.ptr, fr->datalen);
                                }
                                ast_frfree(fr);
@@ -1206,12 +1208,14 @@ static enum ast_bridge_result remote_bridge_loop(struct ast_channel *c0,
                                }
                                ast_frfree(fr);
                        } else if (fr->subclass.integer == AST_CONTROL_CONNECTED_LINE) {
-                               if (ast_channel_connected_line_macro(who, other, fr, other == c0, 1)) {
+                               if (ast_channel_connected_line_sub(who, other, fr, 1) &&
+                                       ast_channel_connected_line_macro(who, other, fr, other == c0, 1)) {
                                        ast_indicate_data(other, fr->subclass.integer, fr->data.ptr, fr->datalen);
                                }
                                ast_frfree(fr);
                        } else if (fr->subclass.integer == AST_CONTROL_REDIRECTING) {
-                               if (ast_channel_redirecting_macro(who, other, fr, other == c0, 1)) {
+                               if (ast_channel_redirecting_sub(who, other, fr, 1) &&
+                                       ast_channel_redirecting_macro(who, other, fr, other == c0, 1)) {
                                        ast_indicate_data(other, fr->subclass.integer, fr->data.ptr, fr->datalen);
                                }
                                ast_frfree(fr);