private void adjustMainURL() {
//#MIDP_EXCLUDE_BEGIN
try {
String mainURL = theProfile.getParameter(MAIN_URL, null);
TransportAddress ta = theDispatcher.stringToAddr(mainURL);
java.net.InetAddress ad = java.net.InetAddress.getByName(ta.getHost());
TransportProtocol tp = theDispatcher.getProtocol(ta.getProto());
String hostAddr = ad.getHostAddress();
if (hostAddr.equals("127.0.0.1")) {
hostAddr = ad.getHostName();
}
ta = tp.buildAddress(hostAddr, ta.getPort(), ta.getFile(), ta.getAnchor());
// DEBUG
//System.out.println("MAIN URL set to "+tp.addrToString(ta));
theProfile.setParameter(MAIN_URL, tp.addrToString(ta));
}
catch (Exception e) {