summaryrefslogtreecommitdiff
path: root/main/presencestate.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 /main/presencestate.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 'main/presencestate.c')
-rw-r--r--main/presencestate.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/main/presencestate.c b/main/presencestate.c
index ae85f01d4..feb6474ca 100644
--- a/main/presencestate.c
+++ b/main/presencestate.c
@@ -53,7 +53,7 @@ static const struct {
{ "dnd", AST_PRESENCE_DND},
};
-struct stasis_message_type *presence_state_type;
+STASIS_MESSAGE_TYPE_DEFN(ast_presence_state_message_type);
struct stasis_topic *presence_state_topic_all;
struct stasis_caching_topic *presence_state_topic_cached;
@@ -289,11 +289,6 @@ int ast_presence_state_changed(enum ast_presence_state state,
return ast_presence_state_changed_literal(state, subtype, message, buf);
}
-struct stasis_message_type *ast_presence_state_message_type(void)
-{
- return presence_state_type;
-}
-
struct stasis_topic *ast_presence_state_topic_all(void)
{
return presence_state_topic_all;
@@ -321,14 +316,12 @@ static void presence_state_engine_cleanup(void)
presence_state_topic_all = NULL;
ao2_cleanup(presence_state_topic_cached);
presence_state_topic_cached = NULL;
- ao2_cleanup(presence_state_type);
- presence_state_type = NULL;
+ STASIS_MESSAGE_TYPE_CLEANUP(ast_presence_state_message_type);
}
int ast_presence_state_engine_init(void)
{
- presence_state_type = stasis_message_type_create("ast_presence_state_message");
- if (!presence_state_type) {
+ if (STASIS_MESSAGE_TYPE_INIT(ast_presence_state_message_type) != 0) {
return -1;
}