diff options
Diffstat (limited to 'utils/conf_launchable.c')
-rw-r--r-- | utils/conf_launchable.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/utils/conf_launchable.c b/utils/conf_launchable.c new file mode 100644 index 00000000..904ade61 --- /dev/null +++ b/utils/conf_launchable.c @@ -0,0 +1,14 @@ +/* + * Determine whether or not a Conf represents a session which can + * sensibly be launched right now. + */ + +#include "putty.h" + +bool conf_launchable(Conf *conf) +{ + if (conf_get_int(conf, CONF_protocol) == PROT_SERIAL) + return conf_get_str(conf, CONF_serline)[0] != 0; + else + return conf_get_str(conf, CONF_host)[0] != 0; +} |