mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-13 12:05:21 +02:00
Bug 300394 - [ftp] Deadlock due to NOOP command not receiving response on the main thread
This commit is contained in:
parent
6d6b04e7ca
commit
bba9934da2
9 changed files with 22 additions and 28 deletions
|
@ -4,7 +4,7 @@ feature@org.eclipse.rse=v201003151933,:pserver:anonymous:none@dev.eclipse.org:/c
|
||||||
feature@org.eclipse.rse.core=v201003151933,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.core-feature
|
feature@org.eclipse.rse.core=v201003151933,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.core-feature
|
||||||
feature@org.eclipse.rse.dstore=v201003010830,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.dstore-feature
|
feature@org.eclipse.rse.dstore=v201003010830,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.dstore-feature
|
||||||
feature@org.eclipse.rse.examples=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/examples/org.eclipse.rse.examples-feature
|
feature@org.eclipse.rse.examples=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/examples/org.eclipse.rse.examples-feature
|
||||||
feature@org.eclipse.rse.ftp=v200909160005,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.ftp-feature
|
feature@org.eclipse.rse.ftp=v201003151933,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.ftp-feature
|
||||||
feature@org.eclipse.rse.local=v201003010830,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.local-feature
|
feature@org.eclipse.rse.local=v201003010830,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.local-feature
|
||||||
feature@org.eclipse.rse.sdk=v201003151933,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.sdk-feature
|
feature@org.eclipse.rse.sdk=v201003151933,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.sdk-feature
|
||||||
feature@org.eclipse.rse.ssh=v200909160005,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.ssh-feature
|
feature@org.eclipse.rse.ssh=v200909160005,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.ssh-feature
|
||||||
|
@ -35,7 +35,7 @@ plugin@org.eclipse.rse.importexport=v201003010830,:pserver:anonymous:none@dev.ec
|
||||||
plugin@org.eclipse.rse.processes.ui=v201003010830,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.processes.ui
|
plugin@org.eclipse.rse.processes.ui=v201003010830,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.processes.ui
|
||||||
plugin@org.eclipse.rse.sdk=v201003151933,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.sdk
|
plugin@org.eclipse.rse.sdk=v201003151933,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.sdk
|
||||||
plugin@org.eclipse.rse.services.dstore=v201003151238,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore
|
plugin@org.eclipse.rse.services.dstore=v201003151238,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore
|
||||||
plugin@org.eclipse.rse.services.files.ftp=v200909160005,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.files.ftp
|
plugin@org.eclipse.rse.services.files.ftp=v201003151933,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.files.ftp
|
||||||
plugin@org.eclipse.rse.services.local=v201003010830,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.local
|
plugin@org.eclipse.rse.services.local=v201003010830,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.local
|
||||||
plugin@org.eclipse.rse.services.ssh=v200909160005,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.ssh
|
plugin@org.eclipse.rse.services.ssh=v200909160005,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.ssh
|
||||||
plugin@org.eclipse.rse.services.telnet=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.telnet
|
plugin@org.eclipse.rse.services.telnet=v200905272300,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.telnet
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Copyright (c) 2006, 2009 IBM Corporation and others.
|
# Copyright (c) 2006, 2010 IBM Corporation and others.
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are made available under the terms of the Eclipse Public License v1.0
|
# are made available under the terms of the Eclipse Public License v1.0
|
||||||
# which accompanies this distribution, and is available at
|
# which accompanies this distribution, and is available at
|
||||||
|
@ -27,7 +27,7 @@ implementation of the file services defined by the RSE API.
|
||||||
|
|
||||||
# "copyright" property - text of the "Feature Update Copyright"
|
# "copyright" property - text of the "Feature Update Copyright"
|
||||||
copyright=\
|
copyright=\
|
||||||
Copyright (c) 2000, 2009 Symbian Software Ltd. and others.\n\
|
Copyright (c) 2000, 2010 Symbian Software Ltd. and others.\n\
|
||||||
All rights reserved. This program and the accompanying materials\n\
|
All rights reserved. This program and the accompanying materials\n\
|
||||||
are made available under the terms of the Eclipse Public License v1.0\n\
|
are made available under the terms of the Eclipse Public License v1.0\n\
|
||||||
which accompanies this distribution, and is available at\n\
|
which accompanies this distribution, and is available at\n\
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
<!--
|
<?xml version="1.0" encoding="UTF-8"?>
<!--
|
||||||
Copyright (c) 2005, 2009 IBM Corporation and others.
|
Copyright (c) 2005, 2010 IBM Corporation and others.
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are made available under the terms of the Eclipse Public License v1.0
|
are made available under the terms of the Eclipse Public License v1.0
|
||||||
which accompanies this distribution, and is available at
|
which accompanies this distribution, and is available at
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
<feature
|
<feature
|
||||||
id="org.eclipse.rse.ftp"
|
id="org.eclipse.rse.ftp"
|
||||||
label="%featureName"
|
label="%featureName"
|
||||||
version="3.0.101.qualifier"
|
version="3.0.200.qualifier"
|
||||||
provider-name="%providerName"
|
provider-name="%providerName"
|
||||||
plugin="org.eclipse.rse.services.files.ftp">
|
plugin="org.eclipse.rse.services.files.ftp">
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Copyright (c) 2006, 2009 IBM Corporation and others.
|
# Copyright (c) 2006, 2010 IBM Corporation and others.
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are made available under the terms of the Eclipse Public License v1.0
|
# are made available under the terms of the Eclipse Public License v1.0
|
||||||
# which accompanies this distribution, and is available at
|
# which accompanies this distribution, and is available at
|
||||||
|
@ -29,7 +29,7 @@ implementation of the file services defined by the RSE API.
|
||||||
|
|
||||||
# "copyright" property - text of the "Feature Update Copyright"
|
# "copyright" property - text of the "Feature Update Copyright"
|
||||||
copyright=\
|
copyright=\
|
||||||
Copyright (c) 2000, 2009 Symbian Software Ltd. and others.\n\
|
Copyright (c) 2000, 2010 Symbian Software Ltd. and others.\n\
|
||||||
All rights reserved. This program and the accompanying materials\n\
|
All rights reserved. This program and the accompanying materials\n\
|
||||||
are made available under the terms of the Eclipse Public License v1.0\n\
|
are made available under the terms of the Eclipse Public License v1.0\n\
|
||||||
which accompanies this distribution, and is available at\n\
|
which accompanies this distribution, and is available at\n\
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
<!--
|
<?xml version="1.0" encoding="UTF-8"?>
<!--
|
||||||
Copyright (c) 2005, 2009 IBM Corporation and others.
|
Copyright (c) 2005, 2010 IBM Corporation and others.
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are made available under the terms of the Eclipse Public License v1.0
|
are made available under the terms of the Eclipse Public License v1.0
|
||||||
which accompanies this distribution, and is available at
|
which accompanies this distribution, and is available at
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
IBM Corporation - initial API and implementation
|
IBM Corporation - initial API and implementation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<feature id="org.eclipse.rse.ftp.source" version="3.0.100.qualifier" label="%featureName" provider-name="%providerName" plugin="org.eclipse.rse.services.files.ftp.source">
|
<feature id="org.eclipse.rse.ftp.source" version="3.0.200.qualifier" label="%featureName" provider-name="%providerName" plugin="org.eclipse.rse.services.files.ftp.source">
|
||||||
<description >
|
<description >
|
||||||
%description
|
%description
|
||||||
</description>
|
</description>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Copyright (c) 2000, 2009 IBM Corporation and others.
|
# Copyright (c) 2000, 2010 IBM Corporation and others.
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are made available under the terms of the Eclipse Public License v1.0
|
# are made available under the terms of the Eclipse Public License v1.0
|
||||||
# which accompanies this distribution, and is available at
|
# which accompanies this distribution, and is available at
|
||||||
|
@ -21,6 +21,6 @@ blurb=RSE FTP Service Source\n\
|
||||||
Version: {featureVersion}\n\
|
Version: {featureVersion}\n\
|
||||||
Build id: {0}\n\
|
Build id: {0}\n\
|
||||||
\n\
|
\n\
|
||||||
(c) Copyright Symbian Software Ltd. and others 2000, 2009. All rights reserved.\n\
|
(c) Copyright Symbian Software Ltd. and others 2000, 2010. All rights reserved.\n\
|
||||||
Visit http://www.eclipse.org/dsdp/tm
|
Visit http://www.eclipse.org/dsdp/tm
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %pluginName
|
Bundle-Name: %pluginName
|
||||||
Bundle-SymbolicName: org.eclipse.rse.services.files.ftp;singleton:=true
|
Bundle-SymbolicName: org.eclipse.rse.services.files.ftp;singleton:=true
|
||||||
Bundle-Version: 3.0.101.qualifier
|
Bundle-Version: 3.0.200.qualifier
|
||||||
Bundle-Activator: org.eclipse.rse.internal.services.files.ftp.Activator
|
Bundle-Activator: org.eclipse.rse.internal.services.files.ftp.Activator
|
||||||
Bundle-Vendor: %providerName
|
Bundle-Vendor: %providerName
|
||||||
Bundle-Localization: plugin
|
Bundle-Localization: plugin
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
################################################################################
|
################################################################################
|
||||||
# Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
|
# Copyright (c) 2006, 2010 Wind River Systems, Inc. and others.
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are made available under the terms of the Eclipse Public License v1.0
|
# are made available under the terms of the Eclipse Public License v1.0
|
||||||
# which accompanies this distribution, and is available at
|
# which accompanies this distribution, and is available at
|
||||||
|
@ -25,7 +25,7 @@ blurb=RSE FTP Service\n\
|
||||||
Version: {featureVersion}\n\
|
Version: {featureVersion}\n\
|
||||||
Build id: {0}\n\
|
Build id: {0}\n\
|
||||||
\n\
|
\n\
|
||||||
(c) Copyright Symbian Software Ltd. and others 2000, 2009. All rights reserved.\n\
|
(c) Copyright Symbian Software Ltd. and others 2000, 2010. All rights reserved.\n\
|
||||||
Visit http://www.eclipse.org/dsdp/tm\n\
|
Visit http://www.eclipse.org/dsdp/tm\n\
|
||||||
\n\
|
\n\
|
||||||
This product includes software developed by the\n\
|
This product includes software developed by the\n\
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* Copyright (c) 2006, 2009 IBM Corporation and others. All rights reserved.
|
* Copyright (c) 2006, 2010 IBM Corporation and others. All rights reserved.
|
||||||
* This program and the accompanying materials are made available under the terms
|
* This program and the accompanying materials are made available under the terms
|
||||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -83,6 +83,7 @@
|
||||||
* Martin Oberhuber (Wind River) - [217472][ftp] Error copying files with very short filenames
|
* Martin Oberhuber (Wind River) - [217472][ftp] Error copying files with very short filenames
|
||||||
* Martin Oberhuber (Wind River) - [285942] Throw exception when listing a non-folder
|
* Martin Oberhuber (Wind River) - [285942] Throw exception when listing a non-folder
|
||||||
* Martin Oberhuber (Wind River) - [285948] Avoid recursive deletion over symbolic links
|
* Martin Oberhuber (Wind River) - [285948] Avoid recursive deletion over symbolic links
|
||||||
|
* Martin Oberhuber (Wind River) - [300398] Avoid product hang-up on isConnected()
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.services.files.ftp;
|
package org.eclipse.rse.internal.services.files.ftp;
|
||||||
|
@ -109,7 +110,6 @@ import org.apache.commons.net.ProtocolCommandListener;
|
||||||
import org.apache.commons.net.ftp.FTP;
|
import org.apache.commons.net.ftp.FTP;
|
||||||
import org.apache.commons.net.ftp.FTPClient;
|
import org.apache.commons.net.ftp.FTPClient;
|
||||||
import org.apache.commons.net.ftp.FTPClientConfig;
|
import org.apache.commons.net.ftp.FTPClientConfig;
|
||||||
import org.apache.commons.net.ftp.FTPConnectionClosedException;
|
|
||||||
import org.apache.commons.net.ftp.FTPFile;
|
import org.apache.commons.net.ftp.FTPFile;
|
||||||
import org.apache.commons.net.ftp.FTPReply;
|
import org.apache.commons.net.ftp.FTPReply;
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
|
@ -721,17 +721,11 @@ public class FTPService extends AbstractFileService implements IFTPService, IFil
|
||||||
|
|
||||||
if(_ftpClient!=null) {
|
if(_ftpClient!=null) {
|
||||||
isConnected = _ftpClient.isConnected();
|
isConnected = _ftpClient.isConnected();
|
||||||
if (isConnected){ // make sure that there hasn't been a timeout
|
// Bug 300394: isConnected() is called on the main thread, so it must
|
||||||
try {
|
// return fast without really checking the remote. In FTP, we deal
|
||||||
_ftpClient.noop();
|
// with "virtual connections" which can automatically re-connect
|
||||||
}
|
// through the getFTPClient() method at any time. Sending NOOP as
|
||||||
catch (FTPConnectionClosedException e){
|
// keepalive is a separate thing to be done.
|
||||||
return false;
|
|
||||||
}
|
|
||||||
catch (IOException e2){
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return isConnected;
|
return isConnected;
|
||||||
|
|
Loading…
Add table
Reference in a new issue