Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv867

Modified Files:
        pbx.c 
Log Message:
Fix locking issue (bug #4041)


Index: pbx.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx.c,v
retrieving revision 1.224
retrieving revision 1.225
diff -u -d -r1.224 -r1.225
--- pbx.c       15 Apr 2005 05:47:40 -0000      1.224
+++ pbx.c       17 Apr 2005 03:44:19 -0000      1.225
@@ -4891,6 +4891,7 @@
                                        ast_verbose(VERBOSE_PREFIX_4 "Channel 
%s was answered.\n", chan->name);
 
                                if (sync > 1) {
+                                       ast_mutex_unlock(&chan->lock);
                                        if (ast_pbx_run(chan)) {
                                                ast_log(LOG_ERROR, "Unable to 
run PBX on %s\n", chan->name);
                                                ast_hangup(chan);
@@ -5061,6 +5062,8 @@
                                        strncpy(tmp->data, appdata, 
sizeof(tmp->data) - 1);
                                        tmp->chan = chan;
                                        if (sync > 1) {
+                                               if (locked_channel)
+                                                       
ast_mutex_unlock(&chan->lock);
                                                ast_pbx_run_app(tmp);
                                        } else {
                                                pthread_attr_init(&attr);

_______________________________________________
Asterisk-Cvs mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-cvs

Reply via email to