diff --git a/src/include/switch_loadable_module.h b/src/include/switch_loadable_module.h index 9a0fc6fd18..42a34d6541 100644 --- a/src/include/switch_loadable_module.h +++ b/src/include/switch_loadable_module.h @@ -392,8 +392,7 @@ SWITCH_DECLARE(uint32_t) switch_core_codec_next_id(void); } -#define PROTECT_INTERFACE(_it) switch_thread_rwlock_rdlock(_it->parent->rwlock); switch_thread_rwlock_rdlock(_it->rwlock) -#define UNPROTECT_INTERFACE(_it) switch_thread_rwlock_unlock(_it->rwlock); switch_thread_rwlock_unlock(_it->parent->rwlock); _it = NULL + diff --git a/src/include/switch_module_interfaces.h b/src/include/switch_module_interfaces.h index a144c333fb..adfce928eb 100644 --- a/src/include/switch_module_interfaces.h +++ b/src/include/switch_module_interfaces.h @@ -620,6 +620,9 @@ struct switch_api_interface { struct switch_api_interface *next; }; +#define PROTECT_INTERFACE(_it) switch_thread_rwlock_rdlock(_it->parent->rwlock); switch_thread_rwlock_rdlock(_it->rwlock) +#define UNPROTECT_INTERFACE(_it) switch_thread_rwlock_unlock(_it->rwlock); switch_thread_rwlock_unlock(_it->parent->rwlock); _it = NULL + SWITCH_END_EXTERN_C #endif /* For Emacs: