[asterisk-commits] twilson: branch twilson/calendaring r160511 - /team/twilson/calendaring/main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Dec 3 08:58:38 CST 2008


Author: twilson
Date: Wed Dec  3 08:58:37 2008
New Revision: 160511

URL: http://svn.digium.com/view/asterisk?view=rev&rev=160511
Log:
Oops, more channel locking/unlocking

Modified:
    team/twilson/calendaring/main/calendar.c

Modified: team/twilson/calendaring/main/calendar.c
URL: http://svn.digium.com/view/asterisk/team/twilson/calendaring/main/calendar.c?view=diff&rev=160511&r1=160510&r2=160511
==============================================================================
--- team/twilson/calendaring/main/calendar.c (original)
+++ team/twilson/calendaring/main/calendar.c Wed Dec  3 08:58:37 2008
@@ -915,6 +915,7 @@
 	ast_channel_lock(chan);
 	if (!(datastore = ast_channel_datastore_find(chan, &eventlist_datastore_info, args.id))) {
 		ast_log(LOG_WARNING, "There is no event notification datastore with id '%s' on '%s'!\n", args.id, chan->name);
+		ast_channel_unlock(chan);
 		return -1;
 	}
 	ast_channel_unlock(chan);
@@ -1138,10 +1139,13 @@
 		return -1;
 	}
 
+	ast_channel_lock(chan);
 	if (!(datastore = ast_channel_datastore_find(chan, &event_notification_datastore, NULL))) {
 		ast_log(LOG_WARNING, "There is no event notification datastore on '%s'!\n", chan->name);
-		return -1;
-	}
+		ast_channel_unlock(chan);
+		return -1;
+	}
+	ast_channel_unlock(chan);
 
 	if (!(event = datastore->data)) {
 		ast_log(LOG_WARNING, "The datastore contains no data!\n");




More information about the asterisk-commits mailing list