Displaying 1 result from an estimated 1 matches for "max_org_record_length".
2009 Nov 07
1
Fwd: [PATCH (geoip)] use IO.pread from the io-extra lib if possible
...t;Invalid GeoIP database type, can''t look up Organization/ISP by IP"
end
pos = seek_record(ipnum);
- record = ""
- @mutex.synchronize {
- @file.seek(pos + (2*@record_length-1) * @databaseSegments[0])
- record = @file.read(MAX_ORG_RECORD_LENGTH)
- }
+ off = pos + (2*@record_length-1) * @databaseSegments[0]
+ record = atomic_read(MAX_ORG_RECORD_LENGTH, off)
record = record.sub(/\000.*/n, '''')
record
end
@@ -686,11 +686,8 @@ class GeoIP
throw "Invalid GeoIP datab...