[svn-commits] tilghman: trunk r38250 - /trunk/res/res_monitor.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Wed Jul 26 10:43:18 MST 2006


Author: tilghman
Date: Wed Jul 26 12:43:17 2006
New Revision: 38250

URL: http://svn.digium.com/view/asterisk?rev=38250&view=rev
Log:
Only unlock these if they were locked on entry

Modified:
    trunk/res/res_monitor.c

Modified: trunk/res/res_monitor.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_monitor.c?rev=38250&r1=38249&r2=38250&view=diff
==============================================================================
--- trunk/res/res_monitor.c (original)
+++ trunk/res/res_monitor.c Wed Jul 26 12:43:17 2006
@@ -200,7 +200,7 @@
 			ast_log(LOG_WARNING, "Could not create file %s\n",
 						monitor->read_filename);
 			free(monitor);
-			ast_channel_unlock(chan);
+			UNLOCK_IF_NEEDED(chan, need_lock);
 			return -1;
 		}
 		if (ast_fileexists(monitor->write_filename, NULL, NULL) > 0) {
@@ -213,7 +213,7 @@
 						monitor->write_filename);
 			ast_closestream(monitor->read_stream);
 			free(monitor);
-			ast_channel_unlock(chan);
+			UNLOCK_IF_NEEDED(chan, need_lock);
 			return -1;
 		}
 		chan->monitor = monitor;



More information about the svn-commits mailing list