<p>Joshua Colp <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/10688">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Kevin Harwell: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved; Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">app_queue: Cleanup queue_ref / queue_unref routines.<br><br>This replaces the inline functions with macros.  This removes the need<br>to directly use __ao2_ref, opts instead for standard ao2_bump and<br>ao2_cleanup macros.<br><br>Change-Id: If4e04e9bab2e3c883188437cb9f487b3e498a21b<br>---<br>M apps/app_queue.c<br>1 file changed, 4 insertions(+), 18 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/apps/app_queue.c b/apps/app_queue.c</span><br><span>index 80c253f..e576094 100644</span><br><span>--- a/apps/app_queue.c</span><br><span>+++ b/apps/app_queue.c</span><br><span>@@ -1918,27 +1918,13 @@</span><br><span>    ao2_callback(queue->members, OBJ_NODATA | OBJ_MULTIPLE, queue_member_decrement_followers, &pos);</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#define queue_ref(q)                            _queue_ref(q, "", __FILE__, __LINE__, __PRETTY_FUNCTION__)</span><br><span style="color: hsl(0, 100%, 40%);">-#define queue_unref(q)                              _queue_unref(q, "", __FILE__, __LINE__, __PRETTY_FUNCTION__)</span><br><span style="color: hsl(0, 100%, 40%);">-#define queue_t_ref(q, tag)                       _queue_ref(q, tag, __FILE__, __LINE__, __PRETTY_FUNCTION__)</span><br><span style="color: hsl(0, 100%, 40%);">-#define queue_t_unref(q, tag)                _queue_unref(q, tag, __FILE__, __LINE__, __PRETTY_FUNCTION__)</span><br><span style="color: hsl(120, 100%, 40%);">+#define queue_ref(q)                             ao2_bump(q)</span><br><span style="color: hsl(120, 100%, 40%);">+#define queue_unref(q)                             ({ ao2_cleanup(q); NULL; })</span><br><span style="color: hsl(120, 100%, 40%);">+#define queue_t_ref(q, tag)                        ao2_t_bump(q, tag)</span><br><span style="color: hsl(120, 100%, 40%);">+#define queue_t_unref(q, tag)               ({ ao2_t_cleanup(q, tag); NULL; })</span><br><span> #define queues_t_link(c, q, tag)  ao2_t_link(c, q, tag)</span><br><span> #define queues_t_unlink(c, q, tag)     ao2_t_unlink(c, q, tag)</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-static inline struct call_queue *_queue_ref(struct call_queue *q, const char *tag, const char *file, int line, const char *filename)</span><br><span style="color: hsl(0, 100%, 40%);">-{</span><br><span style="color: hsl(0, 100%, 40%);">-        __ao2_ref(q, 1, tag, file, line, filename);</span><br><span style="color: hsl(0, 100%, 40%);">-     return q;</span><br><span style="color: hsl(0, 100%, 40%);">-}</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-static inline struct call_queue *_queue_unref(struct call_queue *q, const char *tag, const char *file, int line, const char *filename)</span><br><span style="color: hsl(0, 100%, 40%);">-{</span><br><span style="color: hsl(0, 100%, 40%);">-       if (q) {</span><br><span style="color: hsl(0, 100%, 40%);">-                __ao2_ref(q, -1, tag, file, line, filename);</span><br><span style="color: hsl(0, 100%, 40%);">-    }</span><br><span style="color: hsl(0, 100%, 40%);">-       return NULL;</span><br><span style="color: hsl(0, 100%, 40%);">-}</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span> /*! \brief Set variables of queue */</span><br><span> static void set_queue_variables(struct call_queue *q, struct ast_channel *chan)</span><br><span> {</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/10688">change 10688</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/10688"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: If4e04e9bab2e3c883188437cb9f487b3e498a21b </div>
<div style="display:none"> Gerrit-Change-Number: 10688 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 (1000185) </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>