FS-8811 #resolve [FS 1.7 crashes intermittently]

This commit is contained in:
Anthony Minessale
2016-03-04 16:56:55 -06:00
parent 89c2abaff2
commit 550029b80e
14 changed files with 75 additions and 68 deletions
+1
View File
@@ -390,6 +390,7 @@ struct switch_file_handle {
char *stream_name;
char *modname;
switch_mm_t mm;
switch_mutex_t *flag_mutex;
};
/*! \brief Abstract interface to an asr module */
+4 -4
View File
@@ -635,17 +635,17 @@ SWITCH_DECLARE(unsigned char) switch_char_to_rfc2833(char key);
\param obj the object to set the flags on
\param flag the or'd list of flags to set
*/
#define switch_set_flag_locked(obj, flag) assert(obj->flag_mutex != NULL);\
switch_mutex_lock(obj->flag_mutex);\
#define switch_set_flag_locked(obj, flag) assert((obj)->flag_mutex != NULL); \
switch_mutex_lock((obj)->flag_mutex); \
(obj)->flags |= (flag);\
switch_mutex_unlock(obj->flag_mutex);
switch_mutex_unlock((obj)->flag_mutex);
/*!
\brief Clear a flag on an arbitrary object
\param obj the object to test
\param flag the or'd list of flags to clear
*/
#define switch_clear_flag_locked(obj, flag) switch_mutex_lock(obj->flag_mutex); (obj)->flags &= ~(flag); switch_mutex_unlock(obj->flag_mutex);
#define switch_clear_flag_locked(obj, flag) switch_mutex_lock((obj)->flag_mutex); (obj)->flags &= ~(flag); switch_mutex_unlock((obj)->flag_mutex);
/*!
\brief Clear a flag on an arbitrary object while locked