From 31123c9ff149908120a5bca94e76f5023c0b7e1e Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Thu, 4 Jun 2009 01:44:16 +0000 Subject: Further SSH tunnel improvements, password handling improvements, and minor bugfixes: - SSH tunnels can now correctly show dialogs for ssh queries, eg host key mismatches - SSH tunnels are now correctly closed by the document for connection failures - Keychain password item name and account generation has been moved to within the keychain class, to centralise generation for consistency - Keychain item names and accounts now correctly deal with nil values, allowing more keychain items to be read - "Add to favorites" button and menu item now correctly store passwords and SSH tunnel settings - Duplicating favorites in preferences now selects the newly created favorite instead of deselecting everything - Fixes an occasional crasher sometimes encountered in keychain usage --- Source/CMMCPConnection.m | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Source/CMMCPConnection.m') diff --git a/Source/CMMCPConnection.m b/Source/CMMCPConnection.m index aa2dd430..4ee9263e 100644 --- a/Source/CMMCPConnection.m +++ b/Source/CMMCPConnection.m @@ -239,6 +239,7 @@ static void forcePingTimeout(int signalNumber); theRet = mysql_real_connect(mConnection, theHost, theLogin, thePass, NULL, connectionPort, theSocket, mConnectionFlags); thePass = NULL; if (theRet != mConnection) { + if (connectionTunnel) [connectionTunnel disconnect]; return mConnected = NO; } @@ -576,6 +577,7 @@ static void forcePingTimeout(int signalNumber); [self startKeepAliveTimerResettingState:YES]; return YES; } + if (connectionTunnel) [connectionTunnel disconnect]; return NO; } -- cgit v1.2.3