diff options
Diffstat (limited to 'include/asterisk/utils.h')
-rw-r--r-- | include/asterisk/utils.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h index c7a473732..c3df4779f 100644 --- a/include/asterisk/utils.h +++ b/include/asterisk/utils.h @@ -843,9 +843,14 @@ struct ast_http_digest { */ int ast_parse_digest(const char *digest, struct ast_http_digest *d, int request, int pedantic); +#ifdef DO_CRASH +#define DO_CRASH_NORETURN attribute_noreturn +#else +#define DO_CRASH_NORETURN +#endif #ifdef AST_DEVMODE -void __ast_assert_failed(int condition, const char *condition_str, const char *file, int line, const char *function); +void DO_CRASH_NORETURN __ast_assert_failed(int condition, const char *condition_str, const char *file, int line, const char *function); #define ast_assert(a) _ast_assert(a, # a, __FILE__, __LINE__, __PRETTY_FUNCTION__) static void force_inline _ast_assert(int condition, const char *condition_str, const char *file, int line, const char *function) { @@ -864,7 +869,7 @@ static void force_inline _ast_assert(int condition, const char *condition_str, c * * \return Nothing */ -void ast_do_crash(void); +void DO_CRASH_NORETURN ast_do_crash(void); #include "asterisk/strings.h" @@ -968,6 +973,14 @@ int ast_str_to_eid(struct ast_eid *eid, const char *s); int ast_eid_cmp(const struct ast_eid *eid1, const struct ast_eid *eid2); /*! + * \brief Check if EID is empty + * + * \return 1 if the EID is empty, zero otherwise + * \since 13.12.0 + */ +int ast_eid_is_empty(const struct ast_eid *eid); + +/*! * \brief Get current thread ID * \return the ID if platform is supported, else -1 */ |