提交 19d8a3e3 authored 作者: Michael Jerris's avatar Michael Jerris

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
上级 fb0c65a4
......@@ -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);
}
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论