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
This commit is contained in:
David M. Lee
2013-05-15 02:37:22 +00:00
parent e8f4ac6c61
commit 9648e258c7
11 changed files with 53 additions and 117 deletions

View File

@@ -35,17 +35,12 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/stasis.h"
#include "asterisk/stasis_endpoints.h"
static struct stasis_message_type *endpoint_snapshot_type;
STASIS_MESSAGE_TYPE_DEFN(ast_endpoint_snapshot_type);
static struct stasis_topic *endpoint_topic_all;
static struct stasis_caching_topic *endpoint_topic_all_cached;
struct stasis_message_type *ast_endpoint_snapshot_type(void)
{
return endpoint_snapshot_type;
}
struct stasis_topic *ast_endpoint_topic_all(void)
{
return endpoint_topic_all;
@@ -176,12 +171,7 @@ int ast_endpoint_stasis_init(void)
return -1;
}
if (!endpoint_snapshot_type) {
endpoint_snapshot_type = stasis_message_type_create(
"ast_endpoint_snapshot");
}
if (!endpoint_snapshot_type) {
if (STASIS_MESSAGE_TYPE_INIT(ast_endpoint_snapshot_type) != 0) {
return -1;
}