<p>Sean Bright has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/6296">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">app_queue: Evaluate realtime queues when running dialplan functions<br><br>ASTERISK-19103 #close<br>Reported by: Jim Van Meggelen<br><br>Change-Id: I4bd32a9d1fcebb8ac56bff0e084d4f53e31b692b<br>---<br>M apps/app_queue.c<br>1 file changed, 6 insertions(+), 13 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/96/6296/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/apps/app_queue.c b/apps/app_queue.c<br>index b139ef7..ef40a89 100644<br>--- a/apps/app_queue.c<br>+++ b/apps/app_queue.c<br>@@ -7628,12 +7628,10 @@<br> static int get_member_penalty(char *queuename, char *interface)<br> {<br>         int foundqueue = 0, penalty;<br>- struct call_queue *q, tmpq = {<br>-               .name = queuename,<br>-   };<br>+   struct call_queue *q;<br>         struct member *mem;<br> <br>-       if ((q = ao2_t_find(queues, &tmpq, OBJ_POINTER, "Search for queue"))) {<br>+        if ((q = find_load_queue_rt_friendly(queuename))) {<br>           foundqueue = 1;<br>               ao2_lock(q);<br>          if ((mem = interface_exists(q, interface))) {<br>@@ -8403,10 +8401,7 @@<br> static int queue_function_var(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)<br> {<br>       int res = -1;<br>-        struct call_queue *q, tmpq = {<br>-               .name = data,<br>-        };<br>-<br>+        struct call_queue *q;<br>         char interfacevar[256] = "";<br>        float sl = 0;<br> <br>@@ -8415,7 +8410,7 @@<br>               return -1;<br>    }<br> <br>- if ((q = ao2_t_find(queues, &tmpq, OBJ_POINTER, "Find for QUEUE() function"))) {<br>+       if ((q = find_load_queue_rt_friendly(data))) {<br>                ao2_lock(q);<br>          if (q->setqueuevar) {<br>                      sl = 0;<br>@@ -8813,9 +8808,7 @@<br> /*! \brief Dialplan function QUEUE_MEMBER_LIST() Get list of members in a specific queue */<br> static int queue_function_queuememberlist(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)<br> {<br>-   struct call_queue *q, tmpq = {<br>-               .name = data,<br>-        };<br>+   struct call_queue *q;<br>         struct member *m;<br> <br>  /* Ensure an otherwise empty list doesn't return garbage */<br>@@ -8826,7 +8819,7 @@<br>                return -1;<br>    }<br> <br>- if ((q = ao2_t_find(queues, &tmpq, OBJ_POINTER, "Find for QUEUE_MEMBER_LIST()"))) {<br>+    if ((q = find_load_queue_rt_friendly(data))) {<br>                int buflen = 0, count = 0;<br>            struct ao2_iterator mem_iter;<br> <br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6296">change 6296</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/6296"/><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: I4bd32a9d1fcebb8ac56bff0e084d4f53e31b692b </div>
<div style="display:none"> Gerrit-Change-Number: 6296 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>