mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-26 20:25:34 +08:00
[fix] only display client side net status if connected to itself
This commit is contained in:
@@ -176,8 +176,6 @@ int Render::ShowRecentConnections() {
|
|||||||
connect + "##ConnectionTo" + it->first;
|
connect + "##ConnectionTo" + it->first;
|
||||||
if (ImGui::Button(connect_to_this_connection_button_name.c_str(),
|
if (ImGui::Button(connect_to_this_connection_button_name.c_str(),
|
||||||
ImVec2(button_width, button_height))) {
|
ImVec2(button_width, button_height))) {
|
||||||
LOG_ERROR("Connect to [{}], password [{}]", remote_id.c_str(),
|
|
||||||
password.c_str());
|
|
||||||
remote_id_ = remote_id;
|
remote_id_ = remote_id;
|
||||||
if (!password.empty() && password.size() == 6) {
|
if (!password.empty() && password.size() == 6) {
|
||||||
remember_password_ = true;
|
remember_password_ = true;
|
||||||
|
|||||||
@@ -351,12 +351,12 @@ void Render::NetStatusReport(const char *client_id, size_t client_id_size,
|
|||||||
LOG_INFO("Net mode: [{}]", int(render->traversal_mode_));
|
LOG_INFO("Net mode: [{}]", int(render->traversal_mode_));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (net_traffic_stats && nullptr == strstr(client_id, "C-")) {
|
if (!net_traffic_stats) {
|
||||||
render->net_traffic_stats_.video_in = net_traffic_stats->video_in;
|
return;
|
||||||
render->net_traffic_stats_.video_out = net_traffic_stats->video_out;
|
}
|
||||||
render->net_traffic_stats_.audio_in = net_traffic_stats->audio_in;
|
|
||||||
render->net_traffic_stats_.audio_out = net_traffic_stats->audio_out;
|
// only display client side net status if connected to itself
|
||||||
render->net_traffic_stats_.total_in = net_traffic_stats->total_in;
|
if (!(render->peer_reserved_ && !strstr(client_id, "C-"))) {
|
||||||
render->net_traffic_stats_.total_out = net_traffic_stats->total_out;
|
render->net_traffic_stats_ = *net_traffic_stats;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
2
thirdparty/projectx
vendored
2
thirdparty/projectx
vendored
Submodule thirdparty/projectx updated: c5c85f0785...38fabc9741
Reference in New Issue
Block a user