Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 75023 Details for
Bug 192610
[ftp][efs] EFS operations on an FTP connection make Eclipse freeze
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch using mutex
patch.txt (text/plain), 2.28 KB, created by
Javier Montalvo Orús
on 2007-07-31 07:17:43 EDT
(
hide
)
Description:
Patch using mutex
Filename:
MIME Type:
Creator:
Javier Montalvo Orús
Created:
2007-07-31 07:17:43 EDT
Size:
2.28 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rse.services.files.ftp >Index: src/org/eclipse/rse/internal/services/files/ftp/FTPService.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPService.java,v >retrieving revision 1.27 >diff -u -r1.27 FTPService.java >--- src/org/eclipse/rse/internal/services/files/ftp/FTPService.java 30 Jul 2007 16:37:48 -0000 1.27 >+++ src/org/eclipse/rse/internal/services/files/ftp/FTPService.java 31 Jul 2007 11:10:48 -0000 >@@ -1201,20 +1201,28 @@ > } > } > >- FTPClient ftpClient = getFTPClient(); >- > InputStream stream = null; > >- try { >- >- setFileType(isBinary); >- >- stream = new FTPBufferedInputStream(ftpClient.retrieveFileStream(remoteFile), ftpClient); >- } >- catch (Exception e) { >- throw new RemoteFileIOException(e); >+ if(_commandMutex.waitForLock(monitor, Long.MAX_VALUE)) >+ { >+ >+ FTPClient ftpClient = getFTPClient(); >+ >+ try { >+ >+ >+ ftpClient.changeWorkingDirectory(remoteParent); >+ setFileType(isBinary); >+ stream = new FTPBufferedInputStream(ftpClient.retrieveFileStream(remoteFile), ftpClient); >+ } >+ catch (Exception e) { >+ throw new RemoteFileIOException(e); >+ }finally { >+ _commandMutex.release(); >+ } > } > >+ > return stream; > } > >@@ -1232,20 +1240,24 @@ > } > } > >- FTPClient ftpClient = getFTPClient(); >- > OutputStream stream = null; > >- try { >- >- ftpClient.changeWorkingDirectory(remoteParent); >- >- setFileType(isBinary); >+ if(_commandMutex.waitForLock(monitor, Long.MAX_VALUE)) >+ { >+ >+ FTPClient ftpClient = getFTPClient(); > >- stream = new FTPBufferedOutputStream(ftpClient.storeFileStream(remoteFile), ftpClient); >- } >- catch (Exception e) { >- throw new RemoteFileIOException(e); >+ try { >+ >+ ftpClient.changeWorkingDirectory(remoteParent); >+ setFileType(isBinary); >+ stream = new FTPBufferedOutputStream(ftpClient.storeFileStream(remoteFile), ftpClient); >+ } >+ catch (Exception e) { >+ throw new RemoteFileIOException(e); >+ }finally { >+ _commandMutex.release(); >+ } > } > > return stream;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
mober.at+eclipse
:
iplog-
Actions:
View
|
Diff
Attachments on
bug 192610
:
74949
| 75023 |
75211