other patches. http://asterisk.drunkcoder.com/
Jayson Vantuyl - Manager protocol changes, various other bugs.
jvantuyl@computingedge.net
+Thorsten Lockert - OpenBSD, FreeBSD ports, making MacOS X port run on 10.3,
+ dialplan include verification, route lookup on OpenBSD, various other
+ bugs. tholo@sigmasoft.com
=== OTHER CONTRIBUTIONS ===
John Todd - Monkey sounds and associated teletorture prompt
struct queue_ent *ch;
int res = 0;
for (;;) {
- /* Atomically read the parent head */
- ast_mutex_lock(&qe->parent->lock);
+ /* Atomically read the parent head -- does not need a lock */
ch = qe->parent->head;
- ast_mutex_unlock(&qe->parent->lock);
/* If we are now at the top of the head, break out */
if (qe->parent->head == qe)
break;
/* Get a technology/[device:]number pair */
tmp = malloc(sizeof(struct localuser));
if (!tmp) {
+ ast_mutex_unlock(&qe->parent->lock);
ast_log(LOG_WARNING, "Out of memory\n");
goto out;
}
static int wait_a_bit(struct queue_ent *qe)
{
- int retrywait;
- /* Hold the lock while we setup the outgoing calls */
- ast_mutex_lock(&qe->parent->lock);
- retrywait = qe->parent->retry * 1000;
- ast_mutex_unlock(&qe->parent->lock);
+ /* Don't need to hold the lock while we setup the outgoing calls */
+ int retrywait = qe->parent->retry * 1000;
return ast_waitfordigit(qe->chan, retrywait);
}
/* Mark all queues as dead for the moment */
q = queues;
while(q) {
+ q->dead = 1;
q = q->next;
}
/* Chug through config file */
time(&now);
if (argc != 2)
return RESULT_SHOWUSAGE;
+ ast_mutex_lock(&qlock);
q = queues;
if (!q) {
+ ast_mutex_unlock(&qlock);
ast_cli(fd, "No queues.\n");
return RESULT_SUCCESS;
}
ast_mutex_unlock(&q->lock);
q = q->next;
}
+ ast_mutex_unlock(&qlock);
return RESULT_SUCCESS;
}
struct queue_ent *qe;
astman_send_ack(s, m, "Queue status will follow");
time(&now);
+ ast_mutex_lock(&qlock);
q = queues;
if (id && &id) {
snprintf(idText,256,"ActionID: %s\r\n",id);
ast_mutex_unlock(&q->lock);
q = q->next;
}
+ ast_mutex_unlock(&qlock);
return RESULT_SUCCESS;
}
if( options )
if( strchr( options, 's' ) )
play_announcement = 0;
+ ast_mutex_unlock(&p->lock);
+ ast_mutex_unlock(&agentlock);
if( !res && play_announcement )
res = ast_streamfile(chan, filename, chan->language);
if (!res)
ast_waitstream(chan, "");
+ ast_mutex_lock(&agentlock);
+ ast_mutex_lock(&p->lock);
if (!res) {
res = ast_set_read_format(chan, ast_best_codec(chan->nativeformats));
if (res)
res = -1;
if (callbackmode && !res) {
/* Just say goodbye and be done with it */
+ ast_mutex_unlock(&agentlock);
if (!res)
res = ast_safe_sleep(chan, 500);
res = ast_streamfile(chan, "vm-goodbye", chan->language);
if (!res)
res = ast_safe_sleep(chan, 1000);
ast_mutex_unlock(&p->lock);
- ast_mutex_unlock(&agentlock);
} else if (!res) {
#ifdef HONOR_MUSIC_CLASS
/* check if the moh class was changed with setmusiconhold */