diff options
| author | Shireesh Anjal <shireesh@gluster.com> | 2011-06-16 20:06:05 +0530 |
|---|---|---|
| committer | Shireesh Anjal <shireesh@gluster.com> | 2011-06-16 20:06:05 +0530 |
| commit | caa39e03f14368dbe0c34a00862480b85d1a6236 (patch) | |
| tree | c124dfa17f571634a53e6bff9feaf0d316dde8fa /src | |
| parent | 2fff45c027063d1fe9a5151c19744728c320a36d (diff) | |
Bug 2898 - Trying to cancel the log download window throws error message
Diffstat (limited to 'src')
2 files changed, 7 insertions, 6 deletions
diff --git a/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/actions/DownloadVolumeLogsAction.java b/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/actions/DownloadVolumeLogsAction.java index 8de8aa2d..0f9ae5c6 100644 --- a/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/actions/DownloadVolumeLogsAction.java +++ b/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/actions/DownloadVolumeLogsAction.java @@ -59,13 +59,13 @@ public class DownloadVolumeLogsAction extends AbstractActionDelegate { FileDialog dialog = new FileDialog(getShell(), SWT.SAVE); dialog.setFilterNames(new String[] {"GZipped Tar (*.tar.gz)"}); dialog.setFilterExtensions(new String[] {"*.tar.gz"}); - dialog.open(); + String filePath = dialog.open(); - String title = "Download Volume Logs [" + volume.getName() + "]"; - String filePath = dialog.getFilterPath() + File.separator + dialog.getFileName(); - if(!filePath.endsWith(".tar.gz")) { - filePath += ".tar.gz"; + if(filePath == null) { + return; } + + String title = "Download Volume Logs [" + volume.getName() + "]"; try { client.downloadLogs(volume.getName(), filePath); showInfoDialog(title, "Volume logs downloaded successfully to [" + filePath + "]"); diff --git a/src/com.gluster.storage.management.server/src/com/gluster/storage/management/server/utils/SshUtil.java b/src/com.gluster.storage.management.server/src/com/gluster/storage/management/server/utils/SshUtil.java index 4d3661f8..5f8b88f6 100644 --- a/src/com.gluster.storage.management.server/src/com/gluster/storage/management/server/utils/SshUtil.java +++ b/src/com.gluster.storage.management.server/src/com/gluster/storage/management/server/utils/SshUtil.java @@ -209,7 +209,8 @@ public class SshUtil { Connection conn; conn = new Connection(serverName); try { - conn.connect(); + // tcp connection timeout = 3 sec, ssh connection timeout = 10 sec + conn.connect(null, 3000, 10000); } catch (IOException e) { e.printStackTrace(); throw new ConnectionException("Exception while creating SSH connection with server [" + serverName + "]", e); |
