conf_dest.c 354 B

12345678910111213141516
  1. /*
  2. * Decide whether the 'host name' or 'serial line' field of a Conf is
  3. * important, based on which protocol it has selected.
  4. */
  5. #include "putty.h"
  6. char const *conf_dest(Conf *conf)
  7. {
  8. if (conf_get_int(conf, CONF_protocol) == PROT_SERIAL)
  9. return conf_get_str(conf, CONF_serline);
  10. else
  11. return conf_get_str(conf, CONF_host);
  12. }