]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Omit the conf_launchable check in pterm Duplicate Session.
authorSimon Tatham <anakin@pobox.com>
Sun, 27 Mar 2016 13:10:06 +0000 (14:10 +0100)
committerSimon Tatham <anakin@pobox.com>
Sun, 27 Mar 2016 13:47:51 +0000 (14:47 +0100)
It won't return true, because pterm's use of conf is a bit nonstandard
(it doesn't really bother about the protocol field, and has no use for
either host names _or_ serial port filenames). Was affecting both
gtkapp and gtkmain based builds.

unix/gtkapp.c
unix/gtkmain.c
unix/uxpterm.c
unix/uxputty.c

index 46b3873327568624f3eeba0cdd09e6291e019319..249be2d39269fea334b2743c1835c76854462455 100644 (file)
@@ -192,7 +192,8 @@ extern int cfgbox(Conf *conf);
 
 void launch_duplicate_session(Conf *conf)
 {
-    assert(conf_launchable(conf));
+    extern const int dup_check_launchable;
+    assert(!dup_check_launchable || conf_launchable(conf));
     new_session_window(conf, NULL);
 }
 
index 00db3464b6e48cb7703a9582710648d2d6a89811..a7b4a4e918681002b50771dd4423a4c93a6ccd84 100644 (file)
@@ -582,11 +582,13 @@ int main(int argc, char **argv)
     block_signal(SIGPIPE, 1);
 
     if (argc > 1 && !strncmp(argv[1], "---", 3)) {
+        extern const int dup_check_launchable;
+
        read_dupsession_data(conf, argv[1]);
        /* Splatter this argument so it doesn't clutter a ps listing */
        smemclr(argv[1], strlen(argv[1]));
 
-        assert(conf_launchable(conf));
+        assert(!dup_check_launchable || conf_launchable(conf));
         need_config_box = FALSE;
     } else {
        /* By default, we bring up the config dialog, rather than launching
index 0b848bc721f8eddeae15e63b4e20c6271c636c34..5d0b5f55371f3d7cb5fb15cf42683d9e65061b33 100644 (file)
@@ -10,6 +10,7 @@
 const char *const appname = "pterm";
 const int use_event_log = 0;          /* pterm doesn't need it */
 const int new_session = 0, saved_sessions = 0;   /* or these */
+const int dup_check_launchable = 0; /* no need to check host name in conf */
 const int use_pty_argv = TRUE;
 
 Backend *select_backend(Conf *conf)
index 4de1583d2a27cf5ad573ae5443b0f015e80ac697..6d22fceb76b2b32b8d77489d062222d455efdc7c 100644 (file)
@@ -53,6 +53,7 @@ int cfgbox(Conf *conf)
 static int got_host = 0;
 
 const int use_event_log = 1, new_session = 1, saved_sessions = 1;
+const int dup_check_launchable = 1;
 
 int process_nonoption_arg(const char *arg, Conf *conf, int *allow_launch)
 {