<p>Corey Farrell has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/7327">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">cli: Remove silly usage of RAII_VAR.<br><br>Change-Id: I81aacfee7cd26e4fc5eef07bca582700c2975bd7<br>---<br>M main/cli.c<br>1 file changed, 4 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/27/7327/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/main/cli.c b/main/cli.c<br>index 5c16e8b..66ce8c4 100644<br>--- a/main/cli.c<br>+++ b/main/cli.c<br>@@ -959,7 +959,7 @@<br> #define VERBOSE_FORMAT_STRING "%-20.20s %-20.20s %-16.16s %4d %-7.7s %-12.12s %-25.25s %-15.15s %8.8s %-11.11s %-11.11s %-20.20s\n"<br> #define VERBOSE_FORMAT_STRING2 "%-20.20s %-20.20s %-16.16s %-4.4s %-7.7s %-12.12s %-25.25s %-15.15s %8.8s %-11.11s %-11.11s %-20.20s\n"<br> <br>- RAII_VAR(struct ao2_container *, channels, NULL, ao2_cleanup);<br>+ struct ao2_container *channels;<br> struct ao2_iterator it_chans;<br> struct stasis_message *msg;<br> int numchans = 0, concise = 0, verbose = 0, count = 0;<br>@@ -1073,6 +1073,7 @@<br> <br> ast_cli(a->fd, "%d call%s processed\n", ast_processed_calls(), ESS(ast_processed_calls()));<br> }<br>+ ao2_ref(channels, -1);<br> <br> return CLI_SUCCESS;<br> <br>@@ -1685,7 +1686,7 @@<br> char *ast_complete_channels(const char *line, const char *word, int pos, int state, int rpos)<br> {<br> int wordlen = strlen(word), which = 0;<br>- RAII_VAR(struct ao2_container *, cached_channels, NULL, ao2_cleanup);<br>+ struct ao2_container *cached_channels;<br> char *ret = NULL;<br> struct ao2_iterator iter;<br> struct stasis_message *msg;<br>@@ -1709,6 +1710,7 @@<br> }<br> }<br> ao2_iterator_destroy(&iter);<br>+ ao2_ref(cached_channels, -1);<br> <br> return ret;<br> }<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7327">change 7327</a>. To unsubscribe, 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/7327"/><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-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I81aacfee7cd26e4fc5eef07bca582700c2975bd7 </div>
<div style="display:none"> Gerrit-Change-Number: 7327 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>