Changeset 7f60ee9 for apps


Ignore:
Timestamp:
May 2, 2019 2:25:43 PM (11 months ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
52b14142, 539f880
Parents:
b9726a0
Message:

Console: NTCP2 check

File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/src/net/i2p/router/web/helpers/SummaryHelper.java

    rb9726a0 r7f60ee9  
    248248            case IPV4_DISABLED_IPV6_OK:
    249249            case IPV4_SNAT_IPV6_OK:
    250                 RouterAddress ra = routerInfo.getTargetAddress("NTCP");
    251                 if (ra == null)
     250                List<RouterAddress> ras = routerInfo.getTargetAddresses("NTCP", "NTCP2");
     251                if (ras.isEmpty())
    252252                    return new NetworkStateMessage(NetworkState.RUNNING, _t(status.toStatusString()));
    253                 byte[] ip = ra.getIP();
     253                byte[] ip = null;
     254                for (RouterAddress ra : ras) {
     255                    ip = ra.getIP();
     256                    if (ip != null)
     257                        break;
     258                }
    254259                if (ip == null)
    255260                    return new NetworkStateMessage(NetworkState.ERROR, _t("ERR-Unresolved TCP Address"));
     
    288293            case IPV4_DISABLED_IPV6_UNKNOWN:
    289294            default:
    290                 ra = routerInfo.getTargetAddress("SSU");
     295                RouterAddress ra = routerInfo.getTargetAddress("SSU");
    291296                if (ra == null && _context.router().getUptime() > 5*60*1000) {
    292297                    if (getActivePeers() <= 0)
Note: See TracChangeset for help on using the changeset viewer.