[asterisk-commits] file: branch file/stasis_tweaking r390672 - in /team/file/stasis_tweaking: ./...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jun 6 14:04:47 CDT 2013


Author: file
Date: Thu Jun  6 14:04:45 2013
New Revision: 390672

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=390672
Log:
Incorporate review feedback.

Modified:
    team/file/stasis_tweaking/   (props changed)
    team/file/stasis_tweaking/main/stasis_cache.c

Propchange: team/file/stasis_tweaking/
------------------------------------------------------------------------------
    svnmerge-integrated = /trunk:1-390499

Modified: team/file/stasis_tweaking/main/stasis_cache.c
URL: http://svnview.digium.com/svn/asterisk/team/file/stasis_tweaking/main/stasis_cache.c?view=diff&rev=390672&r1=390671&r2=390672
==============================================================================
--- team/file/stasis_tweaking/main/stasis_cache.c (original)
+++ team/file/stasis_tweaking/main/stasis_cache.c Thu Jun  6 14:04:45 2013
@@ -51,7 +51,7 @@
 	snapshot_get_id id_fn;
 };
 
-static struct stasis_message_type *stasis_cache_guarantee_type(void);
+static struct stasis_message_type *cache_guarantee_type(void);
 
 static void stasis_caching_topic_dtor(void *obj) {
 	struct stasis_caching_topic *caching_topic = obj;
@@ -220,6 +220,8 @@
 {
 	struct stasis_caching_guarantee *guarantee = obj;
 
+	ast_assert(guarantee->done == 1);
+
 	ast_mutex_destroy(&guarantee->lock);
 	ast_cond_destroy(&guarantee->cond);
 }
@@ -236,7 +238,7 @@
 	ast_mutex_init(&guarantee->lock);
 	ast_cond_init(&guarantee->cond, NULL);
 
-	if (!(msg = stasis_message_create(stasis_cache_guarantee_type(), guarantee))) {
+	if (!(msg = stasis_message_create(cache_guarantee_type(), guarantee))) {
 		return NULL;
 	}
 
@@ -313,7 +315,7 @@
 
 STASIS_MESSAGE_TYPE_DEFN(stasis_cache_clear_type);
 STASIS_MESSAGE_TYPE_DEFN(stasis_cache_update_type);
-STASIS_MESSAGE_TYPE_DEFN(stasis_cache_guarantee_type);
+STASIS_MESSAGE_TYPE_DEFN(cache_guarantee_type);
 
 static void cache_clear_dtor(void *obj)
 {
@@ -413,7 +415,7 @@
 	}
 
 	/* Handle cache guarantee event */
-	if (stasis_cache_guarantee_type() == stasis_message_type(message)) {
+	if (cache_guarantee_type() == stasis_message_type(message)) {
 		struct stasis_caching_guarantee *guarantee = stasis_message_data(message);
 
 		ast_mutex_lock(&guarantee->lock);
@@ -519,7 +521,7 @@
 {
 	STASIS_MESSAGE_TYPE_CLEANUP(stasis_cache_clear_type);
 	STASIS_MESSAGE_TYPE_CLEANUP(stasis_cache_update_type);
-	STASIS_MESSAGE_TYPE_CLEANUP(stasis_cache_guarantee_type);
+	STASIS_MESSAGE_TYPE_CLEANUP(cache_guarantee_type);
 }
 
 int stasis_cache_init(void)
@@ -534,7 +536,7 @@
 		return -1;
 	}
 
-	if (STASIS_MESSAGE_TYPE_INIT(stasis_cache_guarantee_type) != 0) {
+	if (STASIS_MESSAGE_TYPE_INIT(cache_guarantee_type) != 0) {
 		return -1;
 	}
 




More information about the asterisk-commits mailing list