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

@@ -565,10 +565,17 @@ struct ao2_container *stasis_cache_dump(struct stasis_caching_topic *caching_top
*/
#define STASIS_MESSAGE_TYPE_INIT(name) \
({ \
ast_assert(_priv_ ## name == NULL); \
_priv_ ## name = stasis_message_type_create(#name); \
_priv_ ## name ? 0 : -1; \
})
/*!
* \brief Boiler-plate removing macro for cleaning up message types.
*
* \param name Name of message type.
* \since 12
*/
#define STASIS_MESSAGE_TYPE_CLEANUP(name) \
({ \
ao2_cleanup(_priv_ ## name); \