search for: seek_record

Displaying 1 result from an estimated 1 matches for "seek_record".

2009 Nov 07
1
Fwd: [PATCH (geoip)] use IO.pread from the io-extra lib if possible
...nless record && record.size == FULL_RECORD_LENGTH # The country code is the first byte: code = record[0] @@ -655,11 +658,8 @@ class GeoIP throw "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 = atomi...