Changeset 86c0fe3


Ignore:
Timestamp:
Nov 21, 2016 9:03:37 PM (4 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
62064da
Parents:
bbb9218
Message:

NetDB: Fix detection of bandwidth class when multiple values are specified

File:
1 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/data/router/RouterInfo.java

    rbbb9218 r86c0fe3  
    9393     */
    9494    public static final String BW_CAPABILITY_CHARS = "" +
    95         Router.CAPABILITY_BW12 +
     95        // reverse, so e.g. "POfR" works correctly
     96        Router.CAPABILITY_BW_UNLIMITED +
     97        Router.CAPABILITY_BW512 +
     98        Router.CAPABILITY_BW256 +
     99        Router.CAPABILITY_BW128 +
     100        Router.CAPABILITY_BW64 +
    96101        Router.CAPABILITY_BW32 +
    97         Router.CAPABILITY_BW64 +
    98         Router.CAPABILITY_BW128 +
    99         Router.CAPABILITY_BW256 +
    100         Router.CAPABILITY_BW512 +
    101         Router.CAPABILITY_BW_UNLIMITED;
     102        Router.CAPABILITY_BW12;
    102103   
    103104    public RouterInfo() {
     
    451452        // Iterate through capabilities, searching for known bandwidth tier
    452453        for (int i = 0; i < capabilities.length(); i++) {
    453             if (bwTiers.indexOf(String.valueOf(capabilities.charAt(i))) != -1) {
     454            if (bwTiers.indexOf(capabilities.charAt(i)) != -1) {
    454455                bwTier = String.valueOf(capabilities.charAt(i));
    455456                break;
Note: See TracChangeset for help on using the changeset viewer.