| Summary: | R-OSGi needs to generate URLs with full host name, not just name | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [RT] ECF | Reporter: | Alex Blewitt <alex.blewitt> | ||||||
| Component: | ecf.protocols | Assignee: | Markus Kuppe <bugs.eclipse.org> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | bugs.eclipse.org, wayne.beaton | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Alex Blewitt
The problem is at R_OSGiContainerInstantiator.java, line 53 (or thereabouts)
if (parameters == null) {
//TODO factor localHost and protocol out?
final String localHost = InetAddress.getLocalHost().getHostName();
final String protocol = "r-osgi"; //$NON-NLS-1$
final int port = remoteOsGiService.getListeningPort(protocol);
final ID containerID = new R_OSGiID(protocol + "://" + localHost + ":" + port); //$NON-NLS-1$ //$NON-NLS-2$
return new R_OSGiRemoteServiceContainer(remoteOsGiService, containerID);
This should be:
final String localHost = InetAddress.getLocalHost().getCanonicalHostName()
I'd suggest refactoring 'localHost' to 'hostName' though, and whilst you're there, you might want to recapitalise the 's' in remoteOsGiService ...
Proposed patch available at: https://github.com/alblue/ecf/tree/bug349550 Created attachment 198216 [details]
Patch for bf9f2f21e4576a763da9d4e5da7b1704b4c705c7
According to [0] 4.) you will have to provide a stmt that the code belongs to you. %) Since the patch is trivial, I assume 4.) isn't really necessary though and move ahead with merging. Markus [0] http://wiki.eclipse.org/Development_Resources/Handling_Git_Contributions Fix released to master http://git.eclipse.org/c/ecf/org.eclipse.ecf.git/commit/?id=eeb496aedb04468ad11cede4347343d6df11bcf3 Created attachment 198226 [details]
mylyn/context/zip
I've removed the redundant IPLog+ flag; the contribution is recorded by Git. |