From dceba7e2e1dad435cb9d867c34f3ab51bc8ab25b Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 3 May 2009 15:39:49 +0000 Subject: [PATCH] - Fixed ip filter parsing on 64bits (Fix by Eric Porter) --- Changelog | 3 +++ src/filterParserThread.h | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Changelog b/Changelog index b7b255ee4..92bb318e3 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,6 @@ +* Unknown - Christophe DUMEZ - v1.3.4 + - BUGFIX: Fixed IP filter file parsing on 64bits + * Sun Apr 5 2009 - Christophe Dumez - v1.3.3 - BUGFIX: Fixed Web UI torrent upload form - BUGFIX: Fixed unicode support in search engine diff --git a/src/filterParserThread.h b/src/filterParserThread.h index 8388a8dec..818d9f07b 100644 --- a/src/filterParserThread.h +++ b/src/filterParserThread.h @@ -191,9 +191,9 @@ class FilterParserThread : public QThread { if(IPv4) { //IPv4 addresses IP = strStartIP.split('.'); - address_v4 start((IP.at(0).toInt() << 24) + (IP.at(1).toInt() << 16) + (IP.at(2).toInt() << 8) + IP.at(3).toInt()); + address_v4 start((IP.at(0).toUInt() << 24) + (IP.at(1).toUInt() << 16) + (IP.at(2).toUInt() << 8) + IP.at(3).toUInt()); IP = strEndIP.split('.'); - address_v4 last((IP.at(0).toInt() << 24) + (IP.at(1).toInt() << 16) + (IP.at(2).toInt() << 8) + IP.at(3).toInt()); + address_v4 last((IP.at(0).toUInt() << 24) + (IP.at(1).toUInt() << 16) + (IP.at(2).toUInt() << 8) + IP.at(3).toUInt()); // Apply to bittorrent session filter.add_rule(start, last, ip_filter::blocked); } else { @@ -250,9 +250,9 @@ class FilterParserThread : public QThread { if(strStartIP.contains(is_ipv4) && strEndIP.contains(is_ipv4)) { // IPv4 IP = strStartIP.split('.'); - address_v4 start((IP.at(0).toInt() << 24) + (IP.at(1).toInt() << 16) + (IP.at(2).toInt() << 8) + IP.at(3).toInt()); + address_v4 start((IP.at(0).toUInt() << 24) + (IP.at(1).toUInt() << 16) + (IP.at(2).toUInt() << 8) + IP.at(3).toUInt()); IP = strEndIP.split('.'); - address_v4 last((IP.at(0).toInt() << 24) + (IP.at(1).toInt() << 16) + (IP.at(2).toInt() << 8) + IP.at(3).toInt()); + address_v4 last((IP.at(0).toUInt() << 24) + (IP.at(1).toUInt() << 16) + (IP.at(2).toUInt() << 8) + IP.at(3).toUInt()); // Apply to bittorrent session filter.add_rule(start, last, ip_filter::blocked); } else {