]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
declinato mortuus obfirmo!
authorMathieu Rene <mrene@avgs.ca>
Thu, 15 Jul 2010 15:21:36 +0000 (11:21 -0400)
committerMathieu Rene <mrene@avgs.ca>
Thu, 15 Jul 2010 15:22:17 +0000 (11:22 -0400)
src/switch_channel.c

index edf162c0fd8bd75b3a1e5607973c3edcf24c9a4c..22f66bad255f2919f12098d92e7deaf69c24f347 100644 (file)
@@ -1230,7 +1230,9 @@ SWITCH_DECLARE(void) switch_channel_set_flag_value(switch_channel_t *channel, sw
 
        switch_mutex_lock(channel->flag_mutex);
        if (flag == CF_LEG_HOLDING && !channel->flags[flag] && channel->flags[CF_ANSWERED]) {
+               switch_mutex_unlock(channel->flag_mutex);
                switch_channel_set_callstate(channel, CCS_HELD);
+               switch_mutex_lock(channel->flag_mutex);
        }
        channel->flags[flag] = value;
        switch_mutex_unlock(channel->flag_mutex);