mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 14:58:25 +00:00
Fix random crashes when using the MeetMe application. This patch converts list
handling to use the linked list macros and most importantly, implements reference counting on the ast_conference objects. The reference counting was first backported from 1.4. However, that code has some problems that caused the reference count to never hit zero. Those problems are fixed in this patch and will be resolved in 1.4 and trunk next, with a different patch. (issues #7647, #9073, #9106, BE-115). git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@55750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
11
utils.c
11
utils.c
@@ -907,3 +907,14 @@ void ast_enable_packet_fragmentation(int sock)
|
||||
#endif
|
||||
}
|
||||
|
||||
AST_MUTEX_DEFINE_STATIC(fetchadd_m); /* used for all fetc&add ops */
|
||||
|
||||
int ast_atomic_fetchadd_int_slow(volatile int *p, int v)
|
||||
{
|
||||
int ret;
|
||||
ast_mutex_lock(&fetchadd_m);
|
||||
ret = *p;
|
||||
*p += v;
|
||||
ast_mutex_unlock(&fetchadd_m);
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user