From fee421beba2b0b5d745ec5684f218397c224c804 Mon Sep 17 00:00:00 2001 From: Andrew Heberle Date: Fri, 5 Sep 2025 21:10:48 +0800 Subject: [PATCH] fix: ensure autoreconnect setting matches documentation (#157) Co-authored-by: bolkedebruin --- cmd/rdpgw/rdp/rdp.go | 2 +- cmd/rdpgw/rdp/rdp_test.go | 5 ++--- cmd/rdpgw/rdp/rdp_test_file.rdp | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/cmd/rdpgw/rdp/rdp.go b/cmd/rdpgw/rdp/rdp.go index 2e1691d..7c69fe6 100644 --- a/cmd/rdpgw/rdp/rdp.go +++ b/cmd/rdpgw/rdp/rdp.go @@ -49,7 +49,7 @@ type RdpSettings struct { EnableRdsAasAuth bool `rdp:"enablerdsaadauth" default:"false"` DisableConnectionSharing bool `rdp:"disableconnectionsharing" default:"false"` AlternateShell string `rdp:"alternate shell"` - AutoReconnectionEnabled bool `rdp:"autoreconnectionenabled" default:"true"` + AutoReconnectionEnabled bool `rdp:"autoreconnection enabled" default:"true"` BandwidthAutodetect bool `rdp:"bandwidthautodetect" default:"true"` NetworkAutodetect bool `rdp:"networkautodetect" default:"true"` Compression bool `rdp:"compression" default:"true"` diff --git a/cmd/rdpgw/rdp/rdp_test.go b/cmd/rdpgw/rdp/rdp_test.go index 4a6017c..f7d0ce5 100644 --- a/cmd/rdpgw/rdp/rdp_test.go +++ b/cmd/rdpgw/rdp/rdp_test.go @@ -20,12 +20,11 @@ func TestRdpBuilder(t *testing.T) { if !strings.Contains(s, "gatewayhostname:s:"+GatewayHostName+CRLF) { t.Fatalf("%s does not contain `gatewayhostname:s:%s", s, GatewayHostName) } - if strings.Contains(s, "autoreconnectionenabled") { - t.Fatalf("autoreconnectionenabled is in %s, but it's default value", s) + if strings.Contains(s, "autoreconnection enabled") { + t.Fatalf("autoreconnection enabled is in %s, but it's default value", s) } if !strings.Contains(s, "smart sizing:i:1"+CRLF) { t.Fatalf("%s does not contain smart sizing:i:1", s) - } log.Printf("%s", builder.String()) } diff --git a/cmd/rdpgw/rdp/rdp_test_file.rdp b/cmd/rdpgw/rdp/rdp_test_file.rdp index 4b7d041..f0e0800 100644 --- a/cmd/rdpgw/rdp/rdp_test_file.rdp +++ b/cmd/rdpgw/rdp/rdp_test_file.rdp @@ -24,7 +24,7 @@ BitmapPersistenceEnabled:i:0 AudioRedirectionMode:i:2 EnablePortRedirection:i:0 EnableDriveRedirection:i:0 -AutoReconnectEnabled:i:1 +AutoReconnect Enabled:i:1 EnableSCardRedirection:i:1 EnablePrinterRedirection:i:0 BBarEnabled:i:0