Avoid creating the Session/hostport control set in mid-session.
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sun, 22 Apr 2007 14:39:01 +0000 (14:39 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sun, 22 Apr 2007 14:39:01 +0000 (14:39 +0000)
git-svn-id: svn://svn.tartarus.org/sgt/putty@7477 cda61777-01e9-0310-a592-d414129be87e

sercfg.c

index 752953e..cde0a90 100644 (file)
--- a/sercfg.c
+++ b/sercfg.c
@@ -104,16 +104,18 @@ void ser_setup_config_box(struct controlbox *b, int midsession,
     struct controlset *s;
     union control *c;
 
-    /*
-     * Add the serial back end to the protocols list at the top of
-     * the config box.
-     */
-    s = ctrl_getset(b, "Session", "hostport",
-                   "Specify your connection by host name or IP address");
-    {
+    if (!midsession) {
        int i;
        extern void config_protocolbuttons_handler(union control *, void *,
                                                   void *, int);
+
+       /*
+        * Add the serial back end to the protocols list at the
+        * top of the config box.
+        */
+       s = ctrl_getset(b, "Session", "hostport",
+                       "Specify the destination you want to connect to");
+
         for (i = 0; i < s->ncontrols; i++) {
             c = s->ctrls[i];
            if (c->generic.type == CTRL_RADIO &&