From f4320b58c8a304d9382fb638096da3671cc200b3 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 28 Nov 2011 08:27:40 -0600 Subject: [PATCH] swap rwlock and mutex --- src/switch_event.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/switch_event.c b/src/switch_event.c index bb7000903d..fcb913f2a5 100644 --- a/src/switch_event.c +++ b/src/switch_event.c @@ -1826,8 +1826,8 @@ SWITCH_DECLARE(switch_status_t) switch_event_bind_removable(const char *id, swit if (event <= SWITCH_EVENT_ALL) { switch_zmalloc(event_node, sizeof(*event_node)); - switch_mutex_lock(BLOCK); switch_thread_rwlock_wrlock(RWLOCK); + switch_mutex_lock(BLOCK); /* ----------------------------------------------- */ event_node->id = DUP(id); event_node->event_id = event; @@ -1842,8 +1842,8 @@ SWITCH_DECLARE(switch_status_t) switch_event_bind_removable(const char *id, swit } EVENT_NODES[event] = event_node; - switch_thread_rwlock_unlock(RWLOCK); switch_mutex_unlock(BLOCK); + switch_thread_rwlock_unlock(RWLOCK); /* ----------------------------------------------- */ if (node) {