From bb92c3248ed8895b81010baedf823ab218c3e2b3 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 2 May 2008 22:28:45 +0000 Subject: [PATCH] update git-svn-id: http://svn.openzap.org/svn/openzap/trunk@467 a93c3328-9c30-0410-af19-c9cd2b2d52af --- libs/openzap/src/zap_isdn.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/openzap/src/zap_isdn.c b/libs/openzap/src/zap_isdn.c index 2b7de4a180..1053e6de20 100644 --- a/libs/openzap/src/zap_isdn.c +++ b/libs/openzap/src/zap_isdn.c @@ -567,9 +567,11 @@ static __inline__ void check_state(zap_span_t *span) zap_clear_flag_locked(span, ZAP_SPAN_STATE_CHANGE); for(j = 1; j <= span->chan_count; j++) { if (zap_test_flag((&span->channels[j]), ZAP_CHANNEL_STATE_CHANGE)) { - zap_clear_flag_locked((&span->channels[j]), ZAP_CHANNEL_STATE_CHANGE); + zap_mutex_lock(span->channels[j].mutex); + zap_clear_flag((&span->channels[j]), ZAP_CHANNEL_STATE_CHANGE); state_advance(&span->channels[j]); zap_channel_complete_state(&span->channels[j]); + zap_mutex_unlock(span->channels[j].mutex); } } }