summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2013-05-27 00:06:40 +0000
committerMatthew Jordan <mjordan@digium.com>2013-05-27 00:06:40 +0000
commita0f6d1848bd42e7379b46c7952460f1711e4d0fb (patch)
treeeead724a7aaf999aa2220731a6709fbbfcc1248a
parent9e35096623951be99de2361164f1621f4e17837c (diff)
Initialize the message type before the topic
Caching topics will during initialization attempt to reference their message type. The message type therefore has to be initialized prior to the topic to prevent the dreaded assertion. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389813 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--main/stasis_endpoints.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/main/stasis_endpoints.c b/main/stasis_endpoints.c
index 252614f62..a7b7f556b 100644
--- a/main/stasis_endpoints.c
+++ b/main/stasis_endpoints.c
@@ -153,6 +153,10 @@ int ast_endpoint_stasis_init(void)
{
ast_register_atexit(endpoints_stasis_shutdown);
+ if (STASIS_MESSAGE_TYPE_INIT(ast_endpoint_snapshot_type) != 0) {
+ return -1;
+ }
+
if (!endpoint_topic_all) {
endpoint_topic_all = stasis_topic_create("endpoint_topic_all");
}
@@ -171,9 +175,5 @@ int ast_endpoint_stasis_init(void)
return -1;
}
- if (STASIS_MESSAGE_TYPE_INIT(ast_endpoint_snapshot_type) != 0) {
- return -1;
- }
-
return 0;
}