Inhibit the Serial configuration panel in mid-session if the session
[sgt/putty] / windows / wincfg.c
index 574e1e8..bc6102d 100644 (file)
@@ -31,7 +31,7 @@ static void help_handler(union control *ctrl, void *dlg,
 }
 
 void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help,
-                         int midsession)
+                         int midsession, int protocol)
 {
     struct controlset *s;
     union control *c;
@@ -375,5 +375,6 @@ void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help,
     /*
      * Serial back end is available on Windows.
      */
-    ser_setup_config_box(b, midsession, 0x1F, 0x0F);
+    if (!midsession || (protocol == PROT_SERIAL))
+        ser_setup_config_box(b, midsession, 0x1F, 0x0F);
 }