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;
|
||||
if (ImGui::Button(connect_to_this_connection_button_name.c_str(),
|
||||
ImVec2(button_width, button_height))) {
|
||||
LOG_ERROR("Connect to [{}], password [{}]", remote_id.c_str(),
|
||||
password.c_str());
|
||||
remote_id_ = remote_id;
|
||||
if (!password.empty() && password.size() == 6) {
|
||||
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_));
|
||||
}
|
||||
|
||||
if (net_traffic_stats && nullptr == strstr(client_id, "C-")) {
|
||||
render->net_traffic_stats_.video_in = net_traffic_stats->video_in;
|
||||
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;
|
||||
render->net_traffic_stats_.total_in = net_traffic_stats->total_in;
|
||||
render->net_traffic_stats_.total_out = net_traffic_stats->total_out;
|
||||
if (!net_traffic_stats) {
|
||||
return;
|
||||
}
|
||||
|
||||
// only display client side net status if connected to itself
|
||||
if (!(render->peer_reserved_ && !strstr(client_id, "C-"))) {
|
||||
render->net_traffic_stats_ = *net_traffic_stats;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user