if (RegCreateKey(HKEY_CURRENT_USER, puttystr, &subkey1)!=ERROR_SUCCESS ||
RegCreateKey(subkey1, p, &sesskey) != ERROR_SUCCESS) {
if (RegCreateKey(HKEY_CURRENT_USER, puttystr, &subkey1)!=ERROR_SUCCESS ||
RegCreateKey(subkey1, p, &sesskey) != ERROR_SUCCESS) {
}
wpps (sesskey, "UserName", cfg.username);
wppi (sesskey, "NoPTY", cfg.nopty);
}
wpps (sesskey, "UserName", cfg.username);
wppi (sesskey, "NoPTY", cfg.nopty);
wppi (sesskey, "RFCEnviron", cfg.rfc_environ);
wppi (sesskey, "BackspaceIsDelete", cfg.bksp_is_delete);
wppi (sesskey, "RXVTHomeEnd", cfg.rxvt_homeend);
wppi (sesskey, "RFCEnviron", cfg.rfc_environ);
wppi (sesskey, "BackspaceIsDelete", cfg.bksp_is_delete);
wppi (sesskey, "RXVTHomeEnd", cfg.rxvt_homeend);
-
- if (RegOpenKey(HKEY_CURRENT_USER, puttystr, &subkey1) != ERROR_SUCCESS ||
- RegOpenKey(subkey1, p, &sesskey) != ERROR_SUCCESS) {
- free(p);
+
+ if (RegOpenKey(HKEY_CURRENT_USER, puttystr, &subkey1) != ERROR_SUCCESS) {
}
gpps (sesskey, "UserName", "", cfg.username, sizeof(cfg.username));
gppi (sesskey, "NoPTY", 0, &cfg.nopty);
}
gpps (sesskey, "UserName", "", cfg.username, sizeof(cfg.username));
gppi (sesskey, "NoPTY", 0, &cfg.nopty);
+ {
+ char cipher[10];
+ gpps (sesskey, "Cipher", "3des", cipher, 10);
+ if (!strcmp(cipher, "blowfish"))
+ cfg.cipher = CIPHER_BLOWFISH;
+ else
+ cfg.cipher = CIPHER_3DES;
+ }
gppi (sesskey, "RFCEnviron", 0, &cfg.rfc_environ);
gppi (sesskey, "BackspaceIsDelete", 1, &cfg.bksp_is_delete);
gppi (sesskey, "RXVTHomeEnd", 0, &cfg.rxvt_homeend);
gppi (sesskey, "RFCEnviron", 0, &cfg.rfc_environ);
gppi (sesskey, "BackspaceIsDelete", 1, &cfg.bksp_is_delete);
gppi (sesskey, "RXVTHomeEnd", 0, &cfg.rxvt_homeend);
+static int CALLBACK LicenceProc (HWND hwnd, UINT msg,
+ WPARAM wParam, LPARAM lParam) {
+ switch (msg) {
+ case WM_INITDIALOG:
+ return 1;
+ case WM_COMMAND:
+ switch (LOWORD(wParam)) {
+ case IDOK:
+ abtbox = NULL;
+ DestroyWindow (hwnd);
+ return 0;
+ }
+ return 0;
+ case WM_CLOSE:
+ abtbox = NULL;
+ DestroyWindow (hwnd);
+ return 0;
+ }
+ return 0;
+}
+
static int CALLBACK AboutProc (HWND hwnd, UINT msg,
WPARAM wParam, LPARAM lParam) {
switch (msg) {
static int CALLBACK AboutProc (HWND hwnd, UINT msg,
WPARAM wParam, LPARAM lParam) {
switch (msg) {
cfg.protocol==PROT_SSH ? IDC0_PROTSSH : IDC0_PROTTELNET);
CheckDlgButton (hwnd, IDC0_CLOSEEXIT, cfg.close_on_exit);
break;
cfg.protocol==PROT_SSH ? IDC0_PROTSSH : IDC0_PROTTELNET);
CheckDlgButton (hwnd, IDC0_CLOSEEXIT, cfg.close_on_exit);
break;
+ case WM_LBUTTONUP:
+ /*
+ * Button release should trigger WM_OK if there was a
+ * previous double click on the session list.
+ */
+ ReleaseCapture();
+ if (readytogo)
+ SendMessage (GetParent(hwnd), WM_COMMAND, IDOK, 0);
+ break;
SetDlgItemText (hwnd, IDC3_TTEDIT, cfg.termtype);
SetDlgItemText (hwnd, IDC3_LOGEDIT, cfg.username);
CheckDlgButton (hwnd, IDC3_NOPTY, cfg.nopty);
SetDlgItemText (hwnd, IDC3_TTEDIT, cfg.termtype);
SetDlgItemText (hwnd, IDC3_LOGEDIT, cfg.username);
CheckDlgButton (hwnd, IDC3_NOPTY, cfg.nopty);
HIWORD(wParam) == BN_DOUBLECLICKED)
cfg.nopty = IsDlgButtonChecked (hwnd, IDC3_NOPTY);
break;
HIWORD(wParam) == BN_DOUBLECLICKED)
cfg.nopty = IsDlgButtonChecked (hwnd, IDC3_NOPTY);
break;
+ case IDC3_CIPHER3DES:
+ case IDC3_CIPHERBLOWF:
+ if (HIWORD(wParam) == BN_CLICKED ||
+ HIWORD(wParam) == BN_DOUBLECLICKED) {
+ if (IsDlgButtonChecked (hwnd, IDC3_CIPHER3DES))
+ cfg.cipher = CIPHER_3DES;
+ else if (IsDlgButtonChecked (hwnd, IDC3_CIPHERBLOWF))
+ cfg.cipher = CIPHER_BLOWFISH;
+ }
+ break;
return GeneralPanelProc (hwnd, msg, wParam, lParam);
}
return GeneralPanelProc (hwnd, msg, wParam, lParam);
}
static DLGPROC panelproc[NPANELS] = {
ConnectionProc, KeyboardProc, TerminalProc,
TelnetProc, SshProc, SelectionProc, ColourProc
static DLGPROC panelproc[NPANELS] = {
ConnectionProc, KeyboardProc, TerminalProc,
TelnetProc, SshProc, SelectionProc, ColourProc