char *p;
int got_host = 0;
- default_protocol = DEFAULT_PROTOCOL;
- default_port = DEFAULT_PORT;
+ default_protocol = be_default_protocol;
+ /* Find the appropriate default port. */
+ {
+ default_port = 0; /* illegal */
+ int i;
+ for (i = 0; backends[i].backend != NULL; i++)
+ if (backends[i].protocol == default_protocol) {
+ default_port = backends[i].backend->default_port;
+ break;
+ }
+ }
cfg.logtype = LGTYP_NONE;
do_defaults(NULL, &cfg);
PostQuitMessage(1);
else {
session_closed = TRUE;
- SetWindowText(hwnd, "PuTTY (inactive)");
+ set_icon(NULL, "PuTTY (inactive)");
+ set_title(NULL, "PuTTY (inactive)");
}
}
cfg.close_on_exit == COE_NORMAL) PostQuitMessage(0);
else {
session_closed = TRUE;
- SetWindowText(hwnd, "PuTTY (inactive)");
+ set_icon(NULL, "PuTTY (inactive)");
+ set_title(NULL, "PuTTY (inactive)");
MessageBox(hwnd, "Connection closed by remote host",
"PuTTY", MB_OK | MB_ICONINFORMATION);
}