summaryrefslogtreecommitdiff
path: root/main/stasis_endpoints.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/stasis_endpoints.c')
-rw-r--r--main/stasis_endpoints.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/main/stasis_endpoints.c b/main/stasis_endpoints.c
index 424df66c5..7428e2cf1 100644
--- a/main/stasis_endpoints.c
+++ b/main/stasis_endpoints.c
@@ -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;
}