Build System:
- The LOW_MEMORY compile option no longer disables inline API. To disable
inline API you must use the DISABLE_INLINE option.
+
+Queue:
+ - When reloading the members of a queue, the members added dynamically (i.e.
+ added via the CLI command "queue add" or the AMI action "QueueAdd") now have
+ their ringinuse value updated to the value of the queue. Previously, the
+ ringinuse value for dynamic members was not updated on reload.
ao2_lock(q);
if ((old_member = interface_exists(q, interface)) == NULL) {
if ((new_member = create_queue_member(interface, membername, penalty, paused, state_interface, q->ringinuse))) {
- new_member->ringinuse = q->ringinuse;
new_member->dynamic = 1;
if (reason_paused) {
ast_copy_string(new_member->reason_paused, reason_paused, sizeof(new_member->reason_paused));
{
int new;
struct call_queue *q = NULL;
+ struct member *member;
/*We're defining a queue*/
struct call_queue tmpq = {
.name = queuename,
const int member_reload = ast_test_flag(mask, QUEUE_RELOAD_MEMBER);
int prev_weight = 0;
struct ast_variable *var;
+ struct ao2_iterator mem_iter;
+
if (!(q = ao2_t_find(queues, &tmpq, OBJ_POINTER, "Find queue for reload"))) {
if (queue_reload) {
/* Make one then */
}
}
+ /* Update ringinuse for dynamic members */
+ if (member_reload) {
+ ao2_lock(q->members);
+ mem_iter = ao2_iterator_init(q->members, AO2_ITERATOR_DONTLOCK);
+ while ((member = ao2_iterator_next(&mem_iter))) {
+ if (member->dynamic) {
+ member->ringinuse = q->ringinuse;
+ }
+ ao2_ref(member, -1);
+ }
+ ao2_iterator_destroy(&mem_iter);
+ ao2_unlock(q->members);
+ }
+
/* At this point, we've determined if the queue has a weight, so update use_weight
* as appropriate
*/