[asterisk-commits] kmoore: branch kmoore/stasis-device_state r384218 - in /team/kmoore/stasis-de...

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


Author: kmoore
Date: Wed Mar 27 17:29:59 2013
New Revision: 384218

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

Modified:
    team/kmoore/stasis-device_state/apps/app_queue.c
    team/kmoore/stasis-device_state/include/asterisk/devicestate.h
    team/kmoore/stasis-device_state/main/ccss.c
    team/kmoore/stasis-device_state/main/devicestate.c
    team/kmoore/stasis-device_state/main/pbx.c
    team/kmoore/stasis-device_state/res/res_jabber.c
    team/kmoore/stasis-device_state/res/res_xmpp.c
    team/kmoore/stasis-device_state/tests/test_devicestate.c

Modified: team/kmoore/stasis-device_state/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-device_state/apps/app_queue.c?view=diff&rev=384218&r1=384217&r2=384218
==============================================================================
--- team/kmoore/stasis-device_state/apps/app_queue.c (original)
+++ team/kmoore/stasis-device_state/apps/app_queue.c Wed Mar 27 17:29:59 2013
@@ -1744,7 +1744,7 @@
 	int found_member;		/* Found this member in this queue */
 	int avail = 0;			/* Found an available member in this queue */
 
-	if (stasis_device_state_message() != stasis_message_type(msg)) {
+	if (stasis_device_state_type() != stasis_message_type(msg)) {
 		return;
 	}
 

Modified: team/kmoore/stasis-device_state/include/asterisk/devicestate.h
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-device_state/include/asterisk/devicestate.h?view=diff&rev=384218&r1=384217&r2=384218
==============================================================================
--- team/kmoore/stasis-device_state/include/asterisk/devicestate.h (original)
+++ team/kmoore/stasis-device_state/include/asterisk/devicestate.h Wed Mar 27 17:29:59 2013
@@ -315,7 +315,7 @@
  * \retval NULL if it has not been allocated
  * \since 12
  */
-struct stasis_message_type *stasis_device_state_message(void);
+struct stasis_message_type *stasis_device_state_type(void);
 
 /*!
  * \brief Initialize the device state core

Modified: team/kmoore/stasis-device_state/main/ccss.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-device_state/main/ccss.c?view=diff&rev=384218&r1=384217&r2=384218
==============================================================================
--- team/kmoore/stasis-device_state/main/ccss.c (original)
+++ team/kmoore/stasis-device_state/main/ccss.c Wed Mar 27 17:29:59 2013
@@ -1349,7 +1349,7 @@
 	 * no steenkin' locks!
 	 */
 	struct stasis_device_state *dev_state;
-	if (stasis_device_state_message() != stasis_message_type(msg)) {
+	if (stasis_device_state_type() != stasis_message_type(msg)) {
 		return;
 	}
 
@@ -2634,7 +2634,7 @@
 	if (stasis_subscription_final_message(sub, msg)) {
 		cc_unref(agent, "Done holding ref for subscription");
 		return;
-	} else if (stasis_device_state_message() != stasis_message_type(msg)) {
+	} else if (stasis_device_state_type() != stasis_message_type(msg)) {
 		return;
 	}
 

Modified: team/kmoore/stasis-device_state/main/devicestate.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-device_state/main/devicestate.c?view=diff&rev=384218&r1=384217&r2=384218
==============================================================================
--- team/kmoore/stasis-device_state/main/devicestate.c (original)
+++ team/kmoore/stasis-device_state/main/devicestate.c Wed Mar 27 17:29:59 2013
@@ -284,7 +284,7 @@
 	RAII_VAR(struct stasis_message *, cached_msg, NULL, ao2_cleanup);
 	struct stasis_device_state *device_state;
 
-	cached_msg = stasis_cache_get(stasis_device_state_topic_cached(), stasis_device_state_message(), device);
+	cached_msg = stasis_cache_get(stasis_device_state_topic_cached(), stasis_device_state_type(), device);
 	if (!cached_msg) {
 		return AST_DEVICE_UNKNOWN;
 	}
@@ -597,7 +597,7 @@
 	RAII_VAR(struct stasis_message *, cached_aggregate_msg, NULL, ao2_cleanup);
 	struct stasis_device_state *cached_aggregate_device_state;
 
-	cached_aggregate_msg = stasis_cache_get(stasis_device_state_topic_cached(), stasis_device_state_message(), device);
+	cached_aggregate_msg = stasis_cache_get(stasis_device_state_topic_cached(), stasis_device_state_type(), device);
 	if (!cached_aggregate_msg) {
 		return 1;
 	}
@@ -625,7 +625,7 @@
 		msg = update->new_snapshot;
 	}
 
-	if (stasis_device_state_message() != stasis_message_type(msg)) {
+	if (stasis_device_state_type() != stasis_message_type(msg)) {
 		return;
 	}
 
@@ -723,7 +723,7 @@
 	return device_state_topic_cached;
 }
 
-struct stasis_message_type *stasis_device_state_message(void)
+struct stasis_message_type *stasis_device_state_type(void)
 {
 	return device_state_message_type;
 }
@@ -750,7 +750,7 @@
 		return -1;
 	}
 
-	message = stasis_message_create(stasis_device_state_message(), device_state);
+	message = stasis_message_create(stasis_device_state_type(), device_state);
 
 	device_specific_topic = stasis_device_state_topic(device);
 	if (!device_specific_topic) {
@@ -764,7 +764,7 @@
 static const char *device_state_get_id(struct stasis_message *message)
 {
 	struct stasis_device_state *device_state;
-	if (stasis_device_state_message() != stasis_message_type(message)) {
+	if (stasis_device_state_type() != stasis_message_type(message)) {
 		return NULL;
 	}
 

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

Modified: team/kmoore/stasis-device_state/res/res_jabber.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-device_state/res/res_jabber.c?view=diff&rev=384218&r1=384217&r2=384218
==============================================================================
--- team/kmoore/stasis-device_state/res/res_jabber.c (original)
+++ team/kmoore/stasis-device_state/res/res_jabber.c Wed Mar 27 17:29:59 2013
@@ -3279,7 +3279,7 @@
 	struct aji_client *client = data;
 	struct stasis_device_state *dev_state;
 
-	if (!stasis_subscription_is_subscribed(sub) || stasis_device_state_message() != stasis_message_type(msg)) {
+	if (!stasis_subscription_is_subscribed(sub) || stasis_device_state_type() != stasis_message_type(msg)) {
 		return;
 	}
 

Modified: team/kmoore/stasis-device_state/res/res_xmpp.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-device_state/res/res_xmpp.c?view=diff&rev=384218&r1=384217&r2=384218
==============================================================================
--- team/kmoore/stasis-device_state/res/res_xmpp.c (original)
+++ team/kmoore/stasis-device_state/res/res_xmpp.c Wed Mar 27 17:29:59 2013
@@ -1357,7 +1357,7 @@
 	struct ast_xmpp_client *client = data;
 	struct stasis_device_state *dev_state;
 
-	if (!stasis_subscription_is_subscribed(sub) || stasis_device_state_message() != stasis_message_type(msg)) {
+	if (!stasis_subscription_is_subscribed(sub) || stasis_device_state_type() != stasis_message_type(msg)) {
 		return;
 	}
 

Modified: team/kmoore/stasis-device_state/tests/test_devicestate.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-device_state/tests/test_devicestate.c?view=diff&rev=384218&r1=384217&r2=384218
==============================================================================
--- team/kmoore/stasis-device_state/tests/test_devicestate.c (original)
+++ team/kmoore/stasis-device_state/tests/test_devicestate.c Wed Mar 27 17:29:59 2013
@@ -384,7 +384,7 @@
 		return 0;
 	}
 
-	msg = stasis_cache_clear_create(stasis_device_state_message(), device_state->cache_id);
+	msg = stasis_cache_clear_create(stasis_device_state_type(), device_state->cache_id);
 	/* topic guaranteed to have been created by this point */
 	stasis_publish(stasis_device_state_topic(device_state->device), msg);
 	return 0;
@@ -451,7 +451,7 @@
 	ast_test_validate(test, AST_DEVICE_NOT_INUSE == consumer->state);
 	ast_test_validate(test, AST_DEVICE_NOT_INUSE == consumer->aggregate_state);
 
-	msg = stasis_cache_get(stasis_device_state_topic_cached(), stasis_device_state_message(), UNIT_TEST_DEVICE_IDENTIFIER);
+	msg = stasis_cache_get(stasis_device_state_topic_cached(), stasis_device_state_type(), UNIT_TEST_DEVICE_IDENTIFIER);
 	device_state = stasis_message_data(msg);
 	ast_test_validate(test, AST_DEVICE_NOT_INUSE == device_state->state);
 	ao2_cleanup(msg);
@@ -466,7 +466,7 @@
 	ast_test_validate(test, AST_DEVICE_NOT_INUSE == consumer->state);
 	ast_test_validate(test, AST_DEVICE_NOT_INUSE == consumer->aggregate_state);
 
-	msg = stasis_cache_get(stasis_device_state_topic_cached(), stasis_device_state_message(), UNIT_TEST_DEVICE_IDENTIFIER);
+	msg = stasis_cache_get(stasis_device_state_topic_cached(), stasis_device_state_type(), UNIT_TEST_DEVICE_IDENTIFIER);
 	device_state = stasis_message_data(msg);
 	ast_test_validate(test, AST_DEVICE_NOT_INUSE == device_state->state);
 	ao2_cleanup(msg);
@@ -479,7 +479,7 @@
 	ast_test_validate(test, AST_DEVICE_INUSE == consumer->state);
 	ast_test_validate(test, AST_DEVICE_INUSE == consumer->aggregate_state);
 
-	msg = stasis_cache_get(stasis_device_state_topic_cached(), stasis_device_state_message(), UNIT_TEST_DEVICE_IDENTIFIER);
+	msg = stasis_cache_get(stasis_device_state_topic_cached(), stasis_device_state_type(), UNIT_TEST_DEVICE_IDENTIFIER);
 	device_state = stasis_message_data(msg);
 	ast_test_validate(test, AST_DEVICE_INUSE == device_state->state);
 	ao2_cleanup(msg);
@@ -492,7 +492,7 @@
 	ast_test_validate(test, AST_DEVICE_RINGING == consumer->state);
 	ast_test_validate(test, AST_DEVICE_RINGINUSE == consumer->aggregate_state);
 
-	msg = stasis_cache_get(stasis_device_state_topic_cached(), stasis_device_state_message(), UNIT_TEST_DEVICE_IDENTIFIER);
+	msg = stasis_cache_get(stasis_device_state_topic_cached(), stasis_device_state_type(), UNIT_TEST_DEVICE_IDENTIFIER);
 	device_state = stasis_message_data(msg);
 	ast_test_validate(test, AST_DEVICE_RINGINUSE == device_state->state);
 	ao2_cleanup(msg);




More information about the asterisk-commits mailing list