<p>Friendly Automation <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/14783">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Joshua Colp: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Friendly Automation: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">scope_trace: Added debug messages and added additional macros<br><br>The SCOPE_ENTER and SCOPE_EXIT* macros now print debug messages<br>at the same level as the scope level. This allows the same<br>messages to be printed to the debug log when AST_DEVMODE<br>isn't enabled.<br><br>Also added a few variants of the SCOPE_EXIT macros that will<br>also call ast_log instead of ast_debug to make it easier to<br>use scope tracing and still print error messages.<br><br>Change-Id: I7fe55f7ec28069919a0fc0b11a82235ce904cc21<br>---<br>M apps/app_dial.c<br>M include/asterisk/logger.h<br>M main/stream.c<br>3 files changed, 100 insertions(+), 26 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/apps/app_dial.c b/apps/app_dial.c</span><br><span>index 9e11487..e384b6d 100644</span><br><span>--- a/apps/app_dial.c</span><br><span>+++ b/apps/app_dial.c</span><br><span>@@ -1224,7 +1224,7 @@</span><br><span> int sent_ring = 0;</span><br><span> int sent_progress = 0;</span><br><span> struct timeval start = ast_tvnow();</span><br><span style="color: hsl(0, 100%, 40%);">- SCOPE_TRACE(1, "%s\n", ast_channel_name(in));</span><br><span style="color: hsl(120, 100%, 40%);">+ SCOPE_ENTER(3, "%s\n", ast_channel_name(in));</span><br><span> </span><br><span> if (single) {</span><br><span> /* Turn off hold music, etc */</span><br><span>@@ -1240,7 +1240,8 @@</span><br><span> *to = -1;</span><br><span> strcpy(pa->status, "CONGESTION");</span><br><span> ast_channel_publish_dial(in, outgoing->chan, NULL, pa->status);</span><br><span style="color: hsl(0, 100%, 40%);">- return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ SCOPE_EXIT_RTN_VALUE(NULL, "%s: can't be made compat with %s\n",</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_channel_name(in), ast_channel_name(outgoing->chan));</span><br><span> }</span><br><span> }</span><br><span> </span><br><span>@@ -1282,7 +1283,7 @@</span><br><span> if (is_cc_recall) {</span><br><span> ast_cc_failed(cc_recall_core_id, "Everyone is busy/congested for the recall. How sad");</span><br><span> }</span><br><span style="color: hsl(0, 100%, 40%);">- return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ SCOPE_EXIT_RTN_VALUE(NULL, "%s: No outging channels available\n", ast_channel_name(in));</span><br><span> }</span><br><span> winner = ast_waitfor_n(watchers, pos, to);</span><br><span> AST_LIST_TRAVERSE(out_chans, o, node) {</span><br><span>@@ -1391,7 +1392,7 @@</span><br><span> case AST_CONTROL_ANSWER:</span><br><span> /* This is our guy if someone answered. */</span><br><span> if (!peer) {</span><br><span style="color: hsl(0, 100%, 40%);">- ast_trace(1, "%s answered %s\n", ast_channel_name(c), ast_channel_name(in));</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_trace(-1, "%s answered %s\n", ast_channel_name(c), ast_channel_name(in));</span><br><span> ast_verb(3, "%s answered %s\n", ast_channel_name(c), ast_channel_name(in));</span><br><span> if (o->orig_chan_name</span><br><span> && strcmp(o->orig_chan_name, ast_channel_name(c))) {</span><br><span>@@ -1426,7 +1427,7 @@</span><br><span> * from being cleaned up when the frame is cleaned up.</span><br><span> */</span><br><span> config->answer_topology = ao2_bump(f->subclass.topology);</span><br><span style="color: hsl(0, 100%, 40%);">- ast_trace(2, "%s Found topology in frame: %p %p %s\n",</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_trace(-1, "%s Found topology in frame: %p %p %s\n",</span><br><span> ast_channel_name(peer), f, config->answer_topology,</span><br><span> ast_str_tmp(256, ast_stream_topology_to_str(config->answer_topology, &STR_TMP)));</span><br><span> }</span><br><span>@@ -1721,7 +1722,7 @@</span><br><span> if (is_cc_recall) {</span><br><span> ast_cc_completed(in, "CC completed, although the caller hung up (cancelled)");</span><br><span> }</span><br><span style="color: hsl(0, 100%, 40%);">- return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ SCOPE_EXIT_RTN_VALUE(NULL, "%s: Caller hung up\n", ast_channel_name(in));</span><br><span> }</span><br><span> </span><br><span> /* now f is guaranteed non-NULL */</span><br><span>@@ -1741,7 +1742,8 @@</span><br><span> if (is_cc_recall) {</span><br><span> ast_cc_completed(in, "CC completed, but the caller used DTMF to exit");</span><br><span> }</span><br><span style="color: hsl(0, 100%, 40%);">- return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ SCOPE_EXIT_RTN_VALUE(NULL, "%s: Caller pressed %c to end call\n",</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_channel_name(in), f->subclass.integer);</span><br><span> }</span><br><span> ast_channel_unlock(in);</span><br><span> }</span><br><span>@@ -1756,7 +1758,8 @@</span><br><span> if (is_cc_recall) {</span><br><span> ast_cc_completed(in, "CC completed, but the caller hung up with DTMF");</span><br><span> }</span><br><span style="color: hsl(0, 100%, 40%);">- return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ SCOPE_EXIT_RTN_VALUE(NULL, "%s: Caller requested disconnect\n",</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_channel_name(in));</span><br><span> }</span><br><span> }</span><br><span> </span><br><span>@@ -1862,7 +1865,8 @@</span><br><span> if (is_cc_recall) {</span><br><span> ast_cc_completed(in, "Recall completed!");</span><br><span> }</span><br><span style="color: hsl(0, 100%, 40%);">- return peer;</span><br><span style="color: hsl(120, 100%, 40%);">+ SCOPE_EXIT_RTN_VALUE(peer, "%s: %s%s\n", ast_channel_name(in),</span><br><span style="color: hsl(120, 100%, 40%);">+ peer ? "Answered by " : "No answer", peer ? ast_channel_name(peer) : "");</span><br><span> }</span><br><span> </span><br><span> static int detect_disconnect(struct ast_channel *chan, char code, struct ast_str **featurecode)</span><br><span>@@ -2284,7 +2288,7 @@</span><br><span> */</span><br><span> struct ast_party_caller caller;</span><br><span> int max_forwards;</span><br><span style="color: hsl(0, 100%, 40%);">- SCOPE_TRACE(1, "%s Data: %s\n", ast_channel_name(chan), data);</span><br><span style="color: hsl(120, 100%, 40%);">+ SCOPE_ENTER(1, "%s: Data: %s\n", ast_channel_name(chan), data);</span><br><span> </span><br><span> /* Reset all DIAL variables back to blank, to prevent confusion (in case we don't reset all of them). */</span><br><span> ast_channel_lock(chan);</span><br><span>@@ -2308,7 +2312,7 @@</span><br><span> ast_log(LOG_WARNING, "Cannot place outbound call from channel '%s'. Max forwards exceeded\n",</span><br><span> ast_channel_name(chan));</span><br><span> pbx_builtin_setvar_helper(chan, "DIALSTATUS", "BUSY");</span><br><span style="color: hsl(0, 100%, 40%);">- return -1;</span><br><span style="color: hsl(120, 100%, 40%);">+ SCOPE_EXIT_RTN_VALUE(-1, "%s: Max forwards exceeded\n", ast_channel_name(chan));</span><br><span> }</span><br><span> </span><br><span> if (ast_check_hangup_locked(chan)) {</span><br><span>@@ -2326,7 +2330,7 @@</span><br><span> */</span><br><span> ast_verb(3, "Caller hung up before dial.\n");</span><br><span> pbx_builtin_setvar_helper(chan, "DIALSTATUS", "CANCEL");</span><br><span style="color: hsl(0, 100%, 40%);">- return -1;</span><br><span style="color: hsl(120, 100%, 40%);">+ SCOPE_EXIT_RTN_VALUE(-1, "%s: Caller hung up before dial\n", ast_channel_name(chan));</span><br><span> }</span><br><span> </span><br><span> parse = ast_strdupa(data ?: "");</span><br><span>@@ -3340,7 +3344,7 @@</span><br><span> ast_free((char *)config.start_sound);</span><br><span> }</span><br><span> ast_ignore_cc(chan);</span><br><span style="color: hsl(0, 100%, 40%);">- return res;</span><br><span style="color: hsl(120, 100%, 40%);">+ SCOPE_EXIT_RTN_VALUE(res, "%s: Done\n", ast_channel_name(chan));</span><br><span> }</span><br><span> </span><br><span> static int dial_exec(struct ast_channel *chan, const char *data)</span><br><span>diff --git a/include/asterisk/logger.h b/include/asterisk/logger.h</span><br><span>index 5514d83..72c938d 100644</span><br><span>--- a/include/asterisk/logger.h</span><br><span>+++ b/include/asterisk/logger.h</span><br><span>@@ -662,6 +662,7 @@</span><br><span> *</span><br><span> */</span><br><span> #define ast_trace_raw(level, indent_type, ...) \</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_debug(level < 0 ? __scope_level : level, " " __VA_ARGS__); \</span><br><span> if (TRACE_ATLEAST(level)) { \</span><br><span> __ast_trace(__FILE__, __LINE__, __PRETTY_FUNCTION__, indent_type, 0, " " __VA_ARGS__); \</span><br><span> }</span><br><span>@@ -676,6 +677,7 @@</span><br><span> * This will print the file, line and function at the current indent level</span><br><span> */</span><br><span> #define ast_trace(level, ...) \</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_debug(level < 0 ? __scope_level : level, " " __VA_ARGS__); \</span><br><span> if (TRACE_ATLEAST(level)) { \</span><br><span> __ast_trace(__FILE__, __LINE__, __PRETTY_FUNCTION__, AST_TRACE_INDENT_SAME, 0, " " __VA_ARGS__); \</span><br><span> }</span><br><span>@@ -765,6 +767,7 @@</span><br><span> #define SCOPE_ENTER(level, ...) \</span><br><span> int __scope_level = level; \</span><br><span> int __scope_task = 0; \</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_debug(__scope_level, " " __VA_ARGS__); \</span><br><span> if (TRACE_ATLEAST(level)) { \</span><br><span> __ast_trace(__FILE__, __LINE__, __PRETTY_FUNCTION__, AST_TRACE_INDENT_INC_AFTER, 0, " " __VA_ARGS__); \</span><br><span> } \</span><br><span>@@ -772,6 +775,7 @@</span><br><span> #define SCOPE_ENTER_TASK(level, indent, ...) \</span><br><span> int __scope_level = level; \</span><br><span> int __scope_task = 1; \</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_debug(__scope_level, " " __VA_ARGS__); \</span><br><span> if (TRACE_ATLEAST(level)) { \</span><br><span> __ast_trace(__FILE__, __LINE__, __PRETTY_FUNCTION__, AST_TRACE_INDENT_PROVIDED, indent, " " __VA_ARGS__); \</span><br><span> } \</span><br><span>@@ -786,6 +790,7 @@</span><br><span> * This macro can be used at the exit points of a statement block since it just prints the message.</span><br><span> */</span><br><span> #define SCOPE_EXIT(...) \</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_debug(__scope_level, " " __VA_ARGS__); \</span><br><span> if (TRACE_ATLEAST(__scope_level)) { \</span><br><span> __ast_trace(__FILE__, __LINE__, __PRETTY_FUNCTION__, AST_TRACE_INDENT_DEC_BEFORE, 0, " " __VA_ARGS__); \</span><br><span> if (__scope_task) { \</span><br><span>@@ -814,6 +819,7 @@</span><br><span> * }</span><br><span> */</span><br><span> #define SCOPE_EXIT_EXPR(__expr, ...) \</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_debug(__scope_level, " " __VA_ARGS__); \</span><br><span> if (TRACE_ATLEAST(__scope_level)) { \</span><br><span> __ast_trace(__FILE__, __LINE__, __PRETTY_FUNCTION__, AST_TRACE_INDENT_DEC_BEFORE, 0, " " __VA_ARGS__); \</span><br><span> if (__scope_task) { \</span><br><span>@@ -833,6 +839,7 @@</span><br><span> * needs to be returned.</span><br><span> */</span><br><span> #define SCOPE_EXIT_RTN(...) \</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_debug(__scope_level, " " __VA_ARGS__); \</span><br><span> if (TRACE_ATLEAST(__scope_level)) { \</span><br><span> __ast_trace(__FILE__, __LINE__, __PRETTY_FUNCTION__, AST_TRACE_INDENT_DEC_BEFORE, 0, " " __VA_ARGS__); \</span><br><span> if (__scope_task) { \</span><br><span>@@ -853,6 +860,7 @@</span><br><span> * needs to be returned.</span><br><span> */</span><br><span> #define SCOPE_EXIT_RTN_VALUE(__return_value, ...) \</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_debug(__scope_level, " " __VA_ARGS__); \</span><br><span> if (TRACE_ATLEAST(__scope_level)) { \</span><br><span> __ast_trace(__FILE__, __LINE__, __PRETTY_FUNCTION__, AST_TRACE_INDENT_DEC_BEFORE, 0, " " __VA_ARGS__); \</span><br><span> if (__scope_task) { \</span><br><span>@@ -861,21 +869,79 @@</span><br><span> } \</span><br><span> return(__return_value)</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#else</span><br><span style="color: hsl(0, 100%, 40%);">-#define ast_trace_raw(__level, __indent_type, ...)</span><br><span style="color: hsl(0, 100%, 40%);">-#define ast_trace(__level, ...)</span><br><span style="color: hsl(120, 100%, 40%);">+#else /* AST_DEVMODE */</span><br><span style="color: hsl(120, 100%, 40%);">+#define ast_trace_raw(level, indent_type, ...) \</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_debug(level < 0 ? __scope_level : level, " " __VA_ARGS__)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#define ast_trace(level, ...) \</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_debug(level < 0 ? __scope_level : level, " " __VA_ARGS__)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> #define ast_trace_get_indent() (0)</span><br><span> #define ast_trace_set_indent(indent)</span><br><span> #define ast_trace_inc_indent()</span><br><span> #define ast_trace_dec_indent()</span><br><span> #define SCOPE_TRACE(__level, ...)</span><br><span style="color: hsl(0, 100%, 40%);">-#define SCOPE_ENTER(level, ...)</span><br><span style="color: hsl(0, 100%, 40%);">-#define SCOPE_ENTER_TASK(level, indent, ...)</span><br><span style="color: hsl(0, 100%, 40%);">-#define SCOPE_EXIT(...)</span><br><span style="color: hsl(0, 100%, 40%);">-#define SCOPE_EXIT_EXPR(__expr, ...) __expr</span><br><span style="color: hsl(0, 100%, 40%);">-#define SCOPE_EXIT_RTN(...) return</span><br><span style="color: hsl(0, 100%, 40%);">-#define SCOPE_EXIT_RTN_VALUE(__return_value, ...) return __return_value</span><br><span style="color: hsl(0, 100%, 40%);">-#endif</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#define SCOPE_ENTER(level, ...) \</span><br><span style="color: hsl(120, 100%, 40%);">+ int __scope_level = level; \</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_debug(level, " " __VA_ARGS__)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#define SCOPE_ENTER_TASK(level, indent, ...) \</span><br><span style="color: hsl(120, 100%, 40%);">+ int __scope_level = level; \</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_debug(level, " " __VA_ARGS__)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#define SCOPE_EXIT(...) \</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_debug(__scope_level, " " __VA_ARGS__)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#define SCOPE_EXIT_EXPR(__expr, ...) \</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_debug(__scope_level, " " __VA_ARGS__); \</span><br><span style="color: hsl(120, 100%, 40%);">+ __expr</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#define SCOPE_EXIT_RTN(...) \</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_debug(__scope_level, " " __VA_ARGS__); \</span><br><span style="color: hsl(120, 100%, 40%);">+ return</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#define SCOPE_EXIT_RTN_VALUE(__return_value, ...) \</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_debug(__scope_level, " " __VA_ARGS__); \</span><br><span style="color: hsl(120, 100%, 40%);">+ return __return_value</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#endif /* AST_DEVMODE */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+/*!</span><br><span style="color: hsl(120, 100%, 40%);">+ * The following macros will print log messages before running</span><br><span style="color: hsl(120, 100%, 40%);">+ * the associated SCOPE_ macro.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#define SCOPE_EXIT_LOG(__log_level, ...) \</span><br><span style="color: hsl(120, 100%, 40%);">+({ \</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(__log_level, " " __VA_ARGS__); \</span><br><span style="color: hsl(120, 100%, 40%);">+ SCOPE_EXIT(" " __VA_ARGS__); \</span><br><span style="color: hsl(120, 100%, 40%);">+})</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#define SCOPE_EXIT_LOG_RTN(__log_level, ...) \</span><br><span style="color: hsl(120, 100%, 40%);">+({ \</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(__log_level, " " __VA_ARGS__); \</span><br><span style="color: hsl(120, 100%, 40%);">+ SCOPE_EXIT_RTN(" " __VA_ARGS__); \</span><br><span style="color: hsl(120, 100%, 40%);">+})</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#define SCOPE_EXIT_LOG_RTN_VALUE(__value, __log_level, ...) \</span><br><span style="color: hsl(120, 100%, 40%);">+({ \</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(__log_level, " " __VA_ARGS__); \</span><br><span style="color: hsl(120, 100%, 40%);">+ SCOPE_EXIT_RTN_VALUE(__value, " " __VA_ARGS__); \</span><br><span style="color: hsl(120, 100%, 40%);">+})</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#define SCOPE_EXIT_LOG_EXPR(__expr, __log_level, ...) \</span><br><span style="color: hsl(120, 100%, 40%);">+({ \</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(__log_level, " " __VA_ARGS__); \</span><br><span style="color: hsl(120, 100%, 40%);">+ SCOPE_EXIT_EXPR(__expr, " " __VA_ARGS__); \</span><br><span style="color: hsl(120, 100%, 40%);">+})</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#define ast_trace_log(__level, __log_level, ...) \</span><br><span style="color: hsl(120, 100%, 40%);">+({ \</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(__log_level, " " __VA_ARGS__); \</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_trace(__level < 0 ? __scope_level : __level, " " __VA_ARGS__); \</span><br><span style="color: hsl(120, 100%, 40%);">+})</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> </span><br><span> #if defined(__cplusplus) || defined(c_plusplus)</span><br><span> }</span><br><span>diff --git a/main/stream.c b/main/stream.c</span><br><span>index c97ae48..859018d 100644</span><br><span>--- a/main/stream.c</span><br><span>+++ b/main/stream.c</span><br><span>@@ -542,6 +542,10 @@</span><br><span> struct ast_stream *joint_stream;</span><br><span> enum ast_media_type media_type = pending_stream ? pending_stream->type : AST_MEDIA_TYPE_UNKNOWN;</span><br><span> int res = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ SCOPE_ENTER(4, "Pending: %s Validation: %s Prefs: %s\n",</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_str_tmp(128, ast_stream_to_str(pending_stream, &STR_TMP)),</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_str_tmp(128, ast_stream_to_str(validation_stream, &STR_TMP)),</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_str_tmp(128, ast_stream_codec_prefs_to_str(prefs, &STR_TMP)));</span><br><span> </span><br><span> if (!pending_stream || !validation_stream || !prefs || !joint_caps</span><br><span> || media_type == AST_MEDIA_TYPE_UNKNOWN) {</span><br><span>@@ -549,7 +553,7 @@</span><br><span> ast_str_append(error_message, 0, "Invalid arguments");</span><br><span> }</span><br><span> ao2_cleanup(joint_caps);</span><br><span style="color: hsl(0, 100%, 40%);">- return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ SCOPE_EXIT_RTN_VALUE(NULL, "Invalid arguments\n");</span><br><span> }</span><br><span> </span><br><span> if (prefs->prefer == CODEC_NEGOTIATION_PREFER_PENDING) {</span><br><span>@@ -593,7 +597,7 @@</span><br><span> }</span><br><span> </span><br><span> ao2_cleanup(joint_caps);</span><br><span style="color: hsl(0, 100%, 40%);">- return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ SCOPE_EXIT_RTN_VALUE(NULL, "No common formats available\n");</span><br><span> }</span><br><span> </span><br><span> if (!ast_format_cap_empty(joint_caps)) {</span><br><span>@@ -641,7 +645,7 @@</span><br><span> }</span><br><span> </span><br><span> ao2_cleanup(joint_caps);</span><br><span style="color: hsl(0, 100%, 40%);">- return joint_stream;</span><br><span style="color: hsl(120, 100%, 40%);">+ SCOPE_EXIT_RTN_VALUE(joint_stream, "Joint stream: %s\n", ast_str_tmp(128, ast_stream_to_str(joint_stream, &STR_TMP)));</span><br><span> }</span><br><span> </span><br><span> static void stream_topology_destroy(void *data)</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/14783">change 14783</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/14783"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I7fe55f7ec28069919a0fc0b11a82235ce904cc21 </div>
<div style="display:none"> Gerrit-Change-Number: 14783 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>