[asterisk-commits] igorg: branch 11 r382410 - in /branches/11: ./ channels/chan_unistim.c

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


Author: igorg
Date: Mon Mar  4 21:51:48 2013
New Revision: 382410

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=382410
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

Modified:
    branches/11/   (props changed)
    branches/11/channels/chan_unistim.c

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

Modified: branches/11/channels/chan_unistim.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/channels/chan_unistim.c?view=diff&rev=382410&r1=382409&r2=382410
==============================================================================
--- branches/11/channels/chan_unistim.c (original)
+++ branches/11/channels/chan_unistim.c Mon Mar  4 21:51:48 2013
@@ -4645,6 +4645,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);
@@ -5078,6 +5079,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