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
{
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");
}
return -1;
}
- if (STASIS_MESSAGE_TYPE_INIT(ast_endpoint_snapshot_type) != 0) {
- return -1;
- }
-
return 0;
}