Changeset 803d7ff


Ignore:
Timestamp:
Jul 24, 2013 12:36:36 PM (7 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
7b4855d7
Parents:
a1c724f8
Message:
  • GeoIP: Fix lookups, broken in IPv6 branch
Location:
router/java/src/net/i2p/router/transport
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/transport/GeoIP.java

    ra1c724f8 r803d7ff  
    144144                _pendingSearch.clear();
    145145                if (search.length > 0) {
     146                    Arrays.sort(search);
    146147                    String[] countries = readGeoIPFile(search);
    147148                    for (int i = 0; i < countries.length; i++) {
     
    156157                _pendingIPv6Search.clear();
    157158                if (search.length > 0) {
     159                    Arrays.sort(search);
    158160                    String[] countries = GeoIPv6.readGeoIPFile(_context, search, _codeCache);
    159161                    for (int i = 0; i < countries.length; i++) {
  • router/java/src/net/i2p/router/transport/GeoIPv6.java

    ra1c724f8 r803d7ff  
    4747     * Lookup search items in the geoip file.
    4848     * See below for format.
     49     *
     50     * @param search a sorted array of IPs to search
     51     * @return an array of country codes, same order as the search param,
     52     *         or a zero-length array on failure
    4953     */
    5054    public static String[] readGeoIPFile(I2PAppContext context, Long[] search, Map<String, String> codeCache) {
     
    6367     * Lookup search items in the geoip file.
    6468     * See below for format.
     69     *
     70     * @param search a sorted array of IPs to search
     71     * @return an array of country codes, same order as the search param,
     72     *         or a zero-length array on failure
    6573     */
    6674    private static String[] readGeoIPFile(File geoFile, Long[] search, Map<String, String> codeCache, Log log) {
Note: See TracChangeset for help on using the changeset viewer.