|
|
@ -129,8 +129,8 @@ extern "C" {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
#define ASTOBJ_COMPONENTS_NOLOCK_FULL(type,namelen,hashes) \
|
|
|
|
#define ASTOBJ_COMPONENTS_NOLOCK_FULL(type,namelen,hashes) \
|
|
|
|
char name[namelen]; \
|
|
|
|
char name[namelen]; \
|
|
|
|
int refcount; \
|
|
|
|
unsigned int refcount; \
|
|
|
|
int objflags; \
|
|
|
|
unsigned int objflags; \
|
|
|
|
__ASTOBJ_HASH(type,hashes)
|
|
|
|
__ASTOBJ_HASH(type,hashes)
|
|
|
|
|
|
|
|
|
|
|
|
/*! \brief Add ASTOBJ components to a struct (without locking support).
|
|
|
|
/*! \brief Add ASTOBJ components to a struct (without locking support).
|
|
|
@ -213,7 +213,7 @@ extern "C" {
|
|
|
|
do { \
|
|
|
|
do { \
|
|
|
|
int newcount = 0; \
|
|
|
|
int newcount = 0; \
|
|
|
|
ASTOBJ_WRLOCK(object); \
|
|
|
|
ASTOBJ_WRLOCK(object); \
|
|
|
|
if (__builtin_expect((object)->refcount, 1)) \
|
|
|
|
if (__builtin_expect((object)->refcount > 0, 1)) \
|
|
|
|
newcount = --((object)->refcount); \
|
|
|
|
newcount = --((object)->refcount); \
|
|
|
|
else \
|
|
|
|
else \
|
|
|
|
ast_log(LOG_WARNING, "Unreferencing unreferenced (object)!\n"); \
|
|
|
|
ast_log(LOG_WARNING, "Unreferencing unreferenced (object)!\n"); \
|
|
|
|