hi,<div><br></div><div>I've an application using the AMI, and that app is calling Getvar with Variable: QUEUE_WAITING_COUNT(queue_foo).</div><div>I can see:</div><div><br></div><div><br></div><div><span style="font-weight: bold;color: #204a87;"> </span>[Sep 13 23:56:03] WARNING[28779]: app_queue.c:4316 queue_function_queuewaitingcount: queue 'queue_foo' was not found</div>
<div>in the CLI (which is not really useful with the AMI)</div><div><br></div><div>But, the AMI is returning:</div><div><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; ">Response: Success <br>
Variable: QUEUE_WAITING_COUNT('queue_foo') <br>Value: 0 </span></div><div><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; "><br></span></div><div><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; ">which makes sense so far.</span></div>
<div><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; "><br></span></div><div><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; ">But why </span>queue_function_queuewaitingcount (from app_queue.c) is returning 0 if the queue_foo doesnt exist.</div>
<div><br></div><div>Does that makes sense to set the count, by default at -1 instead of 0 and in case the queue exists, that will be set to:</div><div>count = q->count;</div><div>Like we can see in app_queue.c</div><div>
<br></div><div>By changing that behavior, that will be much easy for error management:</div><div>-1 : error (queue was not found)</div><div>0: there's really 0 customers waiting in the queue</div><div>>0: x customers are waiting in the queue.</div>
<div><br></div><div><br></div><div>Does that make sense?</div><div>If it's approve, i'll supply the patch for this.</div><div><br></div><div><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; "><br>
</span></div><div><br></div><div><br></div><div><div><br></div>-- <br>Clod Patry<br>
</div>