mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-13 20:50:41 +00:00
don't destroy a mutex we are still using
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@314 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
parent
27145e4245
commit
d0465d4cd2
@ -323,10 +323,6 @@ zap_status_t zap_span_close_all(void)
|
||||
zap_channel_destroy(&span->channels[i]);
|
||||
}
|
||||
|
||||
if (span->mutex) {
|
||||
zap_mutex_destroy(&span->mutex);
|
||||
}
|
||||
|
||||
zap_safe_free(span->signal_data);
|
||||
}
|
||||
zap_mutex_unlock(globals.mutex);
|
||||
@ -1945,6 +1941,7 @@ zap_status_t zap_global_destroy(void)
|
||||
|
||||
if (zap_test_flag(cur_span, ZAP_SPAN_CONFIGURED)) {
|
||||
zap_mutex_lock(cur_span->mutex);
|
||||
zap_clear_flag(cur_span, ZAP_SPAN_CONFIGURED);
|
||||
for(j = 1; j <= cur_span->chan_count; j++) {
|
||||
zap_channel_t *cur_chan = &cur_span->channels[j];
|
||||
if (zap_test_flag(cur_chan, ZAP_CHANNEL_CONFIGURED)) {
|
||||
@ -1952,6 +1949,10 @@ zap_status_t zap_global_destroy(void)
|
||||
}
|
||||
}
|
||||
zap_mutex_unlock(cur_span->mutex);
|
||||
|
||||
if (cur_span->mutex) {
|
||||
zap_mutex_destroy(&cur_span->mutex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user