[asterisk-commits] igorg: trunk r382411 - in /trunk: ./ channels/chan_unistim.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Mar 4 21:53:48 CST 2013


Author: igorg
Date: Mon Mar  4 21:53:44 2013
New Revision: 382411

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=382411
Log:

Fix several unreleased mutex locks that cause problem with processing calls
Reported by: Daniel Bohling
Tested by: Daniel Bohling

(Closes issue ASTERISK-21119)
........

Merged revisions 382409 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 382410 from http://svn.asterisk.org/svn/asterisk/branches/11

Modified:
    trunk/   (props changed)
    trunk/channels/chan_unistim.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Modified: trunk/channels/chan_unistim.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_unistim.c?view=diff&rev=382411&r1=382410&r2=382411
==============================================================================
--- trunk/channels/chan_unistim.c (original)
+++ trunk/channels/chan_unistim.c Mon Mar  4 21:53:44 2013
@@ -4647,6 +4647,7 @@
 	ast_mutex_lock(&sub->parent->parent->lock);
 	if (!sub->parent->parent->session) {
 		ast_log(LOG_WARNING, "Unistim callback function called without a session\n");
+		ast_mutex_unlock(&sub->parent->parent->lock);
 		return NULL;
 	}
 	ast_mutex_unlock(&sub->parent->parent->lock);
@@ -5080,6 +5081,7 @@
 	if (p->owner != oldchan) {
 		ast_log(LOG_WARNING, "old channel wasn't %s (%p) but was %s (%p)\n",
 				ast_channel_name(oldchan), oldchan, ast_channel_name(p->owner), p->owner);
+		ast_mutex_unlock(&p->lock);
 		return -1;
 	}
 




More information about the asterisk-commits mailing list