提交 59a96694 authored 作者: Anthony Minessale's avatar Anthony Minessale

prevent crash when calling mediaStats JSON function in certian circumstances

上级 85fbddc6
......@@ -3173,8 +3173,13 @@ SWITCH_STANDARD_JSON_API(json_stats_function)
audio_stats = switch_core_media_get_stats(tsession, SWITCH_MEDIA_TYPE_AUDIO, switch_core_session_get_pool(tsession));
video_stats = switch_core_media_get_stats(tsession, SWITCH_MEDIA_TYPE_VIDEO, switch_core_session_get_pool(tsession));
if (audio_stats) {
jsonify_stats(reply, "audio", audio_stats);
}
if (video_stats) {
jsonify_stats(reply, "video", video_stats);
}
if (true_enough(cdata) && switch_ivr_generate_json_cdr(tsession, &jevent, SWITCH_FALSE) == SWITCH_STATUS_SUCCESS) {
cJSON_AddItemToObject(reply, "channelData", jevent);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论