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 72599 Details for
Bug 194464
[telnet] Cannot create multiple telnet shells in quick succession
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
patch for bug 194464
patch194464.txt (text/plain), 3.44 KB, created by
Sheldon
on 2007-06-27 09:52:43 EDT
(
hide
)
Description:
patch for bug 194464
Filename:
MIME Type:
Creator:
Sheldon
Created:
2007-06-27 09:52:43 EDT
Size:
3.44 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rse.connectorservice.telnet >Index: src/org/eclipse/rse/internal/connectorservice/telnet/TelnetConnectorService.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.connectorservice.telnet/src/org/eclipse/rse/internal/connectorservice/telnet/TelnetConnectorService.java,v >retrieving revision 1.12 >diff -u -r1.12 TelnetConnectorService.java >--- src/org/eclipse/rse/internal/connectorservice/telnet/TelnetConnectorService.java 27 Jun 2007 08:21:11 -0000 1.12 >+++ src/org/eclipse/rse/internal/connectorservice/telnet/TelnetConnectorService.java 27 Jun 2007 13:50:23 -0000 >@@ -67,8 +67,6 @@ > private static final int TELNET_CONNECT_TIMEOUT = 60; //seconds - TODO: Make configurable > private List fTelnetClients = new ArrayList(); > private SessionLostHandler fSessionLostHandler; >- private InputStream in; >- private PrintStream out; > private IPropertySet telnetPropertySet = null; > private static final int ERROR_CODE = 100; // filed error code > private static final int SUCCESS_CODE = 150; // login pass code >@@ -148,11 +146,8 @@ > password = ssi.getPassword(); > } > >- in = client.getInputStream(); >- out = new PrintStream(client.getOutputStream()); >- > long millisToEnd = System.currentTimeMillis() + TELNET_CONNECT_TIMEOUT*1000; >- LoginThread checkLogin = new LoginThread(user, password); >+ LoginThread checkLogin = new LoginThread(user, password,client.getInputStream(),new PrintStream( client.getOutputStream() )); > checkLogin.start(); > while (checkLogin.isAlive() && System.currentTimeMillis()<millisToEnd) { > if (monitor!=null) { >@@ -231,7 +226,7 @@ > } > } > >- public int readUntil(String pattern) { >+ public int readUntil(String pattern,InputStream in) { > try { > char lastChar = pattern.charAt(pattern.length() - 1); > StringBuffer sb = new StringBuffer(); >@@ -260,7 +255,7 @@ > return CONNECT_CLOSED; > } > >- public void write(String value) { >+ public void write(String value,PrintStream out) { > try { > out.println(value); > out.flush(); >@@ -498,10 +493,14 @@ > private String username; > private String password; > private int status = SUCCESS_CODE; >+ private InputStream in; >+ private PrintStream out; > >- public LoginThread(String username, String password) { >+ public LoginThread(String username, String password,InputStream in,PrintStream out) { > this.username = username; > this.password = password; >+ this.in = in; >+ this.out = out; > } > > public void run() { >@@ -519,19 +518,19 @@ > if (Boolean.valueOf(login_required).booleanValue()) { > status = SUCCESS_CODE; > if (login_prompt != null && login_prompt.length() > 0) { >- status = readUntil(login_prompt); >- write(username); >+ status = readUntil(login_prompt,this.in); >+ write(username,this.out); > } > if (status == SUCCESS_CODE && password_prompt != null && password_prompt.length() > 0) { >- status = readUntil(password_prompt); >- write(password); >+ status = readUntil(password_prompt,this.in); >+ write(password,this.out); > } > if (status == SUCCESS_CODE && command_prompt != null && command_prompt.length() > 0) { >- status = readUntil(command_prompt); >+ status = readUntil(command_prompt,this.in); > } > } else { > if (command_prompt != null && command_prompt.length() > 0) { >- status = readUntil(command_prompt); >+ status = readUntil(command_prompt,this.in); > } > } > }
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 194464
: 72599