From: Anthony Minessale Date: Mon, 28 Nov 2011 14:27:40 +0000 (-0600) Subject: swap rwlock and mutex X-Git-Tag: v1.2-rc1~27^2~131 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4320b58c8a304d9382fb638096da3671cc200b3;p=thirdparty%2Ffreeswitch.git swap rwlock and mutex --- 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) {