forked from I2P_Developers/i2p.i2p
* Fix webapp PortMapper lookup for SSL-only console
This commit is contained in:
@ -137,12 +137,16 @@ public class WebAppStarter {
|
|||||||
|
|
||||||
/** see comments in ConfigClientsHandler */
|
/** see comments in ConfigClientsHandler */
|
||||||
static Server getConsoleServer() {
|
static Server getConsoleServer() {
|
||||||
|
PortMapper pm = I2PAppContext.getGlobalContext().portMapper();
|
||||||
|
int p1 = pm.getPort(PortMapper.SVC_CONSOLE);
|
||||||
|
int p2 = pm.getPort(PortMapper.SVC_HTTPS_CONSOLE);
|
||||||
Collection c = Server.getHttpServers();
|
Collection c = Server.getHttpServers();
|
||||||
for (int i = 0; i < c.size(); i++) {
|
for (int i = 0; i < c.size(); i++) {
|
||||||
Server s = (Server) c.toArray()[i];
|
Server s = (Server) c.toArray()[i];
|
||||||
HttpListener[] hl = s.getListeners();
|
HttpListener[] hl = s.getListeners();
|
||||||
for (int j = 0; j < hl.length; j++) {
|
for (int j = 0; j < hl.length; j++) {
|
||||||
if (hl[j].getPort() == I2PAppContext.getGlobalContext().portMapper().getPort(PortMapper.SVC_CONSOLE))
|
int port = hl[j].getPort();
|
||||||
|
if (port == p1 || port == p2)
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -59,8 +59,6 @@ public class PortMapper {
|
|||||||
*/
|
*/
|
||||||
public int getPort(String service) {
|
public int getPort(String service) {
|
||||||
int port = getPort(service, -1);
|
int port = getPort(service, -1);
|
||||||
if(-1==port)
|
|
||||||
throw new RuntimeException("No port registered for service "+service);
|
|
||||||
return port;
|
return port;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
2012-01-02 zzz
|
||||||
|
* Fix webapp PortMapper lookup for SSL-only console
|
||||||
|
* Wrapper 3.5.13 for arm v7
|
||||||
|
|
||||||
2011-12-31 zzz
|
2011-12-31 zzz
|
||||||
* Fix log NPE when saveConfig() fails at startup, thx kytv
|
* Fix log NPE when saveConfig() fails at startup, thx kytv
|
||||||
(backport from jetty6 branch)
|
(backport from jetty6 branch)
|
||||||
|
@ -18,7 +18,7 @@ public class RouterVersion {
|
|||||||
/** deprecated */
|
/** deprecated */
|
||||||
public final static String ID = "Monotone";
|
public final static String ID = "Monotone";
|
||||||
public final static String VERSION = CoreVersion.VERSION;
|
public final static String VERSION = CoreVersion.VERSION;
|
||||||
public final static long BUILD = 26;
|
public final static long BUILD = 27;
|
||||||
|
|
||||||
/** for example "-test" */
|
/** for example "-test" */
|
||||||
public final static String EXTRA = "-rc";
|
public final static String EXTRA = "-rc";
|
||||||
|
Reference in New Issue
Block a user