[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [dsdp-tm-dev] Telnet Help
|
Can you connect your telnet session
interactively?
Perhaps your remote has an unrecognized kind of prompt,
see
Cheers,
--
Martin Oberhuber, Senior Member of Technical
Staff, Wind River
Target Management Project
Lead, DSDP PMC Member
Hi,
I have connected to a host, i get the shell service, now
when i try to launch the shell, the application is hanging at
TelnetConnectorService -- client.connect(host, getTelnetPort()) of
makeNewTelnetClient() method. Could you tell me what i am missing here...
IHost host =
null;
try {
boolean isRegistryActive =
RSEUIPlugin.isTheSystemRegistryActive();
if (isRegistryActive)
{
Job[] jobs = Job.getJobManager
().find(null);
for (int i = 0; i < jobs.length; i++)
{
if ("Initialize
RSE".equals(jobs[i].getName())) { //$NON-NLS-1$
// If still initializing, wait until done
jobs[i].join();
break;
}
}
IHost[] connections =
RSECorePlugin.getTheSystemRegistry()
.getHostsBySubSystemConfigurationCategory("shells");
IRSESystemType sysType = null;
for (int i = 0; i
< connections.length; i++) {
if
(connections[i].getName().equals(connectionName)) {
sysType =
connections[i].getSystemType();
break;
}
}
ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
host = sr.createHost(sysType, connectionName,
connectionName,
"Remote
connection");
}
ISubSystem[]
subSystems = host.getSubSystems ();
int i;
for (i = 0; subSystems != null && i <
subSystems.length; i++) {
if (subSystems[i] instanceof
IShellServiceSubSystem)
break;
}
final
ISubSystem subSystem = subSystems[i];
subSystem.getConnectorService().setUserId("temp");
subSystem.getConnectorService().setPassword("temp", "temp", true,
true);
subSystem.getConnectorService().saveUserId();
subSystem.getConnectorService().savePassword();
Display.getDefault().syncExec(new
Runnable() {
public void run() {
try {
subSystem.connect(true, null);
} catch (Exception e)
{
}
}
});
IHostShell
hostShell = null;
IShellService shellService = ((IShellServiceSubSystem)
subSystem)
.getShellService();
String env[] = new String[0];
if (shellService != null)
{
try {
Thread.sleep(1000);
} catch (InterruptedException e)
{
e.printStackTrace();
}
hostShell =
shellService.launchShell("", env,
new NullProgressMonitor());
}
Regards
Hari