[gnome-remote-desktop/gnome-42] rdp/nw-auto: Disallow unqueued bandwidth measure stops



commit 665f734ab7cdd52b9b2340e00f42f91a919baca7
Author: Pascal Nowack <Pascal Nowack gmx de>
Date:   Tue Aug 2 06:00:50 2022 +0200

    rdp/nw-auto: Disallow unqueued bandwidth measure stops
    
    Recently, it was discovered, that WinPR events are handled in
    unexpected manners on a few systems.
    In this case here, a Bandwidth Measure Stop PDU can be sent before it
    is meant to be sent.
    This results into an unexpected state of the bandwidth measurement
    state machine, as the bandwidth measure stop was meant to be queued
    before it is actually stopped.
    Since there are currently no places, where a Bandwidth Measure Stop PDU
    is sent directly, disallow unqueued bandwidth measure stops.
    
    Fixes: https://errors.ubuntu.com/problem/98a015184483b3876c1a63cfb0191c51ab2df6e5

 src/grd-rdp-network-autodetection.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/grd-rdp-network-autodetection.c b/src/grd-rdp-network-autodetection.c
index f8ff9129..ee620856 100644
--- a/src/grd-rdp-network-autodetection.c
+++ b/src/grd-rdp-network-autodetection.c
@@ -308,8 +308,7 @@ grd_rdp_network_autodetection_bw_measure_stop (GrdRdpNetworkAutodetection *netwo
   locker = g_mutex_locker_new (&network_autodetection->bw_measure_mutex);
   ResetEvent (network_autodetection->bw_measure_stop_event);
 
-  if (network_autodetection->bw_measure_state != BW_MEASURE_STATE_PENDING_STOP &&
-      network_autodetection->bw_measure_state != BW_MEASURE_STATE_QUEUED_STOP)
+  if (network_autodetection->bw_measure_state != BW_MEASURE_STATE_QUEUED_STOP)
     return;
 
   network_autodetection->bw_measure_state = BW_MEASURE_STATE_PENDING_RESULTS;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]