Merge "bridge_softmix / app_confbridge: Add support for REMB combining."
authorGeorge Joseph <gjoseph@digium.com>
Wed, 18 Apr 2018 20:37:45 +0000 (15:37 -0500)
committerGerrit Code Review <gerrit2@gerrit.digium.api>
Wed, 18 Apr 2018 20:37:45 +0000 (15:37 -0500)
include/asterisk/utils.h
utils/Makefile

index 4da7fa4..b892cda 100644 (file)
@@ -578,6 +578,13 @@ void DO_CRASH_NORETURN __ast_assert_failed(int condition, const char *condition_
 
 #ifdef AST_DEVMODE
 #define ast_assert(a) _ast_assert(a, # a, __FILE__, __LINE__, __PRETTY_FUNCTION__)
+#define ast_assert_return(a, ...) \
+({ \
+       if (__builtin_expect(!(a), 1)) { \
+               _ast_assert(0, # a, __FILE__, __LINE__, __PRETTY_FUNCTION__); \
+               return __VA_ARGS__; \
+       }\
+})
 static void force_inline _ast_assert(int condition, const char *condition_str, const char *file, int line, const char *function)
 {
        if (__builtin_expect(!condition, 1)) {
@@ -586,6 +593,12 @@ static void force_inline _ast_assert(int condition, const char *condition_str, c
 }
 #else
 #define ast_assert(a)
+#define ast_assert_return(a, ...) \
+({ \
+       if (__builtin_expect(!(a), 1)) { \
+               return __VA_ARGS__; \
+       }\
+})
 #endif
 
 /*!
index d62d45f..ae2af08 100644 (file)
@@ -164,7 +164,7 @@ aelparse.c: $(ASTTOPDIR)/res/ael/ael_lex.c
        $(CMD_PREFIX) mv "$@.new" "$@"
 
 aelparse.o: _ASTCFLAGS+=-I$(ASTTOPDIR)/res -Wno-unused
-aelparse: LIBS+=-lm
+aelparse: LIBS+=-lm $(AST_CLANG_BLOCKS_LIBS)
 aelparse: aelparse.o aelbison.o pbx_ael.o hashtab.o lock.o ael_main.o ast_expr2f.o ast_expr2.o strcompat.o pval.o extconf.o astmm.o
 
 threadstorage.c: $(ASTTOPDIR)/main/threadstorage.c
@@ -174,6 +174,7 @@ threadstorage.c: $(ASTTOPDIR)/main/threadstorage.c
 
 extconf.o: extconf.c
 
+conf2ael: LIBS+=$(AST_CLANG_BLOCKS_LIBS)
 conf2ael: conf2ael.o ast_expr2f.o ast_expr2.o hashtab.o lock.o aelbison.o aelparse.o pbx_ael.o pval.o extconf.o strcompat.o astmm.o
 
 check_expr2: $(ASTTOPDIR)/main/ast_expr2f.c $(ASTTOPDIR)/main/ast_expr2.c $(ASTTOPDIR)/main/ast_expr2.h astmm.o