[Asterisk-code-review] abstract jb: Remove silly usage of RAII VAR. (asterisk[13])

Corey Farrell asteriskteam at digium.com
Mon Nov 20 14:03:05 CST 2017


Corey Farrell has uploaded this change for review. ( https://gerrit.asterisk.org/7313


Change subject: abstract_jb: Remove silly usage of RAII_VAR.
......................................................................

abstract_jb: Remove silly usage of RAII_VAR.

Change-Id: I9d56175369363d1dc735504cf78a3a5577069f49
---
M main/abstract_jb.c
1 file changed, 3 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/13/7313/1

diff --git a/main/abstract_jb.c b/main/abstract_jb.c
index 1c9eb51..6e776c0 100644
--- a/main/abstract_jb.c
+++ b/main/abstract_jb.c
@@ -445,7 +445,7 @@
 
 	/* Create a frame log file */
 	if (ast_test_flag(jbconf, AST_JB_LOG)) {
-		RAII_VAR(struct ast_channel *, bridged, ast_channel_bridge_peer(chan), ast_channel_cleanup);
+		struct ast_channel *bridged = ast_channel_bridge_peer(chan);
 		char safe_logfile[30] = "/tmp/logfile-XXXXXX";
 		int safe_fd;
 
@@ -481,6 +481,8 @@
 			jb_framelog("JB_PUT_FIRST {now=%ld}: Dropped frame with ts=%ld and len=%ld\n",
 				now, frr->ts, frr->len);
 		}
+
+		ast_channel_cleanup(bridged);
 	}
 
 	ast_verb(3, "%s jitterbuffer created on channel %s\n", jbimpl->name, ast_channel_name(chan));

-- 
To view, visit https://gerrit.asterisk.org/7313
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9d56175369363d1dc735504cf78a3a5577069f49
Gerrit-Change-Number: 7313
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171120/d65dbf89/attachment.html>


More information about the asterisk-code-review mailing list