[asterisk-commits] kmoore: branch kmoore/stasis-presence_state r384217 - in /team/kmoore/stasis-...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Mar 27 17:27:58 CDT 2013


Author: kmoore
Date: Wed Mar 27 17:27:55 2013
New Revision: 384217

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=384217
Log:
Convert to the new stasis naming convention

Modified:
    team/kmoore/stasis-presence_state/funcs/func_presencestate.c
    team/kmoore/stasis-presence_state/include/asterisk/presencestate.h
    team/kmoore/stasis-presence_state/main/pbx.c
    team/kmoore/stasis-presence_state/main/presencestate.c

Modified: team/kmoore/stasis-presence_state/funcs/func_presencestate.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-presence_state/funcs/func_presencestate.c?view=diff&rev=384217&r1=384216&r2=384217
==============================================================================
--- team/kmoore/stasis-presence_state/funcs/func_presencestate.c (original)
+++ team/kmoore/stasis-presence_state/funcs/func_presencestate.c Wed Mar 27 17:27:55 2013
@@ -653,7 +653,7 @@
 static void test_cb(void *userdata, struct stasis_subscription *sub, struct stasis_topic *topic, struct stasis_message *msg)
 {
 	struct test_cb_data *cb_data = userdata;
-	if (stasis_message_type(msg) != stasis_presence_state_message()) {
+	if (stasis_message_type(msg) != stasis_presence_state_type()) {
 		return;
 	}
 	cb_data->presence_state = stasis_message_data(msg);

Modified: team/kmoore/stasis-presence_state/include/asterisk/presencestate.h
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-presence_state/include/asterisk/presencestate.h?view=diff&rev=384217&r1=384216&r2=384217
==============================================================================
--- team/kmoore/stasis-presence_state/include/asterisk/presencestate.h (original)
+++ team/kmoore/stasis-presence_state/include/asterisk/presencestate.h Wed Mar 27 17:27:55 2013
@@ -154,7 +154,7 @@
  * \retval Stasis message type for presence state messages
  * \since 12
  */
-struct stasis_message_type *stasis_presence_state_message(void);
+struct stasis_message_type *stasis_presence_state_type(void);
 
 /*!
  * \brief Get presence state topic

Modified: team/kmoore/stasis-presence_state/main/pbx.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-presence_state/main/pbx.c?view=diff&rev=384217&r1=384216&r2=384217
==============================================================================
--- team/kmoore/stasis-presence_state/main/pbx.c (original)
+++ team/kmoore/stasis-presence_state/main/pbx.c Wed Mar 27 17:27:55 2013
@@ -11545,7 +11545,7 @@
 	char context_name[AST_MAX_CONTEXT];
 	char exten_name[AST_MAX_EXTENSION];
 
-	if (stasis_message_type(msg) != stasis_presence_state_message()) {
+	if (stasis_message_type(msg) != stasis_presence_state_type()) {
 		return;
 	}
 

Modified: team/kmoore/stasis-presence_state/main/presencestate.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-presence_state/main/presencestate.c?view=diff&rev=384217&r1=384216&r2=384217
==============================================================================
--- team/kmoore/stasis-presence_state/main/presencestate.c (original)
+++ team/kmoore/stasis-presence_state/main/presencestate.c Wed Mar 27 17:27:55 2013
@@ -53,7 +53,7 @@
 	{ "dnd", AST_PRESENCE_DND},
 };
 
-struct stasis_message_type *presence_state_message;
+struct stasis_message_type *presence_state_type;
 struct stasis_topic *presence_state_topic_all;
 struct stasis_caching_topic *presence_state_topic_cached;
 
@@ -95,7 +95,7 @@
 	RAII_VAR(struct stasis_message *, msg, NULL, ao2_cleanup);
 	struct stasis_presence_state *presence_state;
 
-	msg = stasis_cache_get(stasis_presence_state_topic_cached(), stasis_presence_state_message(), presence_provider);
+	msg = stasis_cache_get(stasis_presence_state_topic_cached(), stasis_presence_state_type(), presence_provider);
 
 	if (!msg) {
 		return res;
@@ -235,7 +235,7 @@
 		return;
 	}
 
-	msg = stasis_message_create(stasis_presence_state_message(), presence_state);
+	msg = stasis_message_create(stasis_presence_state_type(), presence_state);
 	if (!msg) {
 		return;
 	}
@@ -289,9 +289,9 @@
 	return ast_presence_state_changed_literal(state, subtype, message, buf);
 }
 
-struct stasis_message_type *stasis_presence_state_message(void)
-{
-	return presence_state_message;
+struct stasis_message_type *stasis_presence_state_type(void)
+{
+	return presence_state_type;
 }
 
 struct stasis_topic *stasis_presence_state_topic_all(void)
@@ -308,7 +308,7 @@
 {
 	struct stasis_presence_state *presence_state = stasis_message_data(msg);
 
-	if (stasis_message_type(msg) != stasis_presence_state_message()) {
+	if (stasis_message_type(msg) != stasis_presence_state_type()) {
 		return NULL;
 	}
 
@@ -321,14 +321,14 @@
 	presence_state_topic_all = NULL;
 	ao2_cleanup(presence_state_topic_cached);
 	presence_state_topic_cached = NULL;
-	ao2_cleanup(presence_state_message);
-	presence_state_message = NULL;
+	ao2_cleanup(presence_state_type);
+	presence_state_type = NULL;
 }
 
 int ast_presence_state_engine_init(void)
 {
-	presence_state_message = stasis_message_type_create("stasis_presence_state_message");
-	if (!presence_state_message) {
+	presence_state_type = stasis_message_type_create("stasis_presence_state");
+	if (!presence_state_type) {
 		return -1;
 	}
 




More information about the asterisk-commits mailing list