}
}
/* Don't allow return code > 0 */
- if (res > 0)
+ if (res > 0 && res != AST_PBX_KEEPALIVE) {
res = 0;
- ast_moh_stop(chan);
+ ast_moh_stop(chan);
+ }
leave_queue(&qe);
} else {
ast_log(LOG_WARNING, "Unable to join queue '%s'\n", queuename);
if (q) {
/* Initialize it */
memset(q, 0, sizeof(struct ast_call_queue));
+ ast_pthread_mutex_init(&q->lock);
strncpy(q->name, cat, sizeof(q->name));
new = 1;
} else new = 0;
}
cat = ast_category_browse(cfg, cat);
}
+ ast_destroy(cfg);
q = queues;
ql = NULL;
while(q) {