summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorShireesh Anjal <shireesh@gluster.com>2011-06-16 20:06:05 +0530
committerShireesh Anjal <shireesh@gluster.com>2011-06-16 20:06:05 +0530
commitcaa39e03f14368dbe0c34a00862480b85d1a6236 (patch)
treec124dfa17f571634a53e6bff9feaf0d316dde8fa /src
parent2fff45c027063d1fe9a5151c19744728c320a36d (diff)
Bug 2898 - Trying to cancel the log download window throws error message
Diffstat (limited to 'src')
-rw-r--r--src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/actions/DownloadVolumeLogsAction.java10
-rw-r--r--src/com.gluster.storage.management.server/src/com/gluster/storage/management/server/utils/SshUtil.java3
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);