[Asterisk-cvs] asterisk/channels chan_agent.c,1.58,1.59
markster at lists.digium.com
markster at lists.digium.com
Fri Nov 7 22:09:45 CST 2003
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv25079/channels
Modified Files:
chan_agent.c
Log Message:
Trustingly add Thorston's deadlock patch
Index: chan_agent.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_agent.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- chan_agent.c 8 Sep 2003 16:48:06 -0000 1.58
+++ chan_agent.c 8 Nov 2003 04:35:57 -0000 1.59
@@ -1154,10 +1154,14 @@
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)
@@ -1173,6 +1177,7 @@
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);
@@ -1181,7 +1186,6 @@
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 */
More information about the svn-commits
mailing list