summaryrefslogtreecommitdiff
path: root/main/asterisk.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/asterisk.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/asterisk.c')
-rw-r--r--main/asterisk.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/main/asterisk.c b/main/asterisk.c
index 885797f36..9308230fb 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -415,7 +415,7 @@ static struct {
static struct stasis_topic *system_topic;
/*!\ brief The \ref stasis_message_type for network changes */
-static struct stasis_message_type *network_change_type;
+STASIS_MESSAGE_TYPE_DEFN(ast_network_change_type);
#if !defined(LOW_MEMORY)
struct file_version {
@@ -1063,18 +1063,12 @@ struct stasis_topic *ast_system_topic(void)
return system_topic;
}
-struct stasis_message_type *ast_network_change_type(void)
-{
- return network_change_type;
-}
-
/*! \brief Cleanup the \ref stasis system level items */
static void stasis_system_topic_cleanup(void)
{
ao2_ref(system_topic, -1);
system_topic = NULL;
- ao2_ref(network_change_type, -1);
- network_change_type = NULL;
+ STASIS_MESSAGE_TYPE_CLEANUP(ast_network_change_type);
}
/*! \brief Initialize the system level items for \ref stasis */
@@ -1087,8 +1081,7 @@ static int stasis_system_topic_init(void)
return 1;
}
- network_change_type = stasis_message_type_create("network_change");
- if (!network_change_type) {
+ if (STASIS_MESSAGE_TYPE_INIT(ast_network_change_type) != 0) {
return -1;
}
return 0;