summaryrefslogtreecommitdiff
path: root/res/res_stasis_test.c
diff options
context:
space:
mode:
authorDavid M. Lee <dlee@digium.com>2013-05-15 02:37:22 +0000
committerDavid M. Lee <dlee@digium.com>2013-05-15 02:37:22 +0000
commit9648e258c76a24c5a24e16c634fcda73829e5d30 (patch)
treea0dc5b31ee73a83a7799413929a40436a1526293 /res/res_stasis_test.c
parente8f4ac6c610265b46014da9259062bb74d3892d1 (diff)
Refactored the rest of the message types to use the STASIS_MESSAGE_TYPE_*
macros. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_stasis_test.c')
-rw-r--r--res/res_stasis_test.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/res/res_stasis_test.c b/res/res_stasis_test.c
index 7b5aece4f..372efbe94 100644
--- a/res/res_stasis_test.c
+++ b/res/res_stasis_test.c
@@ -35,7 +35,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$");
#include "asterisk/module.h"
#include "asterisk/stasis_test.h"
-static struct stasis_message_type *test_message_type;
+STASIS_MESSAGE_TYPE_DEFN(stasis_test_message_type);
static void stasis_message_sink_dtor(void *obj)
{
@@ -259,23 +259,15 @@ struct stasis_message *stasis_test_message_create(void)
return stasis_message_create(stasis_test_message_type(), data);
}
-struct stasis_message_type *stasis_test_message_type(void)
-{
- return test_message_type;
-}
-
static int unload_module(void)
{
- ao2_cleanup(test_message_type);
- test_message_type = NULL;
+ STASIS_MESSAGE_TYPE_CLEANUP(stasis_test_message_type);
return 0;
}
static int load_module(void)
{
- test_message_type = stasis_message_type_create(
- "stasis_test_message");
- if (!test_message_type) {
+ if (STASIS_MESSAGE_TYPE_INIT(stasis_test_message_type) != 0) {
return AST_MODULE_LOAD_FAILURE;
}