From 7e912594bcf490ffcbcd49c3530da66effb70cda Mon Sep 17 00:00:00 2001 From: Alex Borisov Date: Sat, 3 Dec 2011 15:14:25 +0200 Subject: FIX request data to be parsed wo \n --- client/Config.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'client/Config.cpp') diff --git a/client/Config.cpp b/client/Config.cpp index ef6a37b..7cfc4fb 100644 --- a/client/Config.cpp +++ b/client/Config.cpp @@ -343,7 +343,8 @@ void Config::ParseGenericProxies(string data) while (! proxies.eof()) { proxies.getline(str, str_size, ';'); - proxies.ignore(2, '\n'); + if (proxies.eof()) + break; string entry = str; ProxyEntryGeneric proxy; proxy.Parse(entry); @@ -362,7 +363,8 @@ void Config::ParseStaticPorxies(string data) while (! proxies.eof()) { proxies.getline(str, str_size, ';'); - proxies.ignore(2, '\n'); + if (proxies.eof()) + break; string entry = str; ProxyEntryStatic proxy; proxy.Parse(entry); @@ -380,7 +382,8 @@ void Config::ParseFirewalls(string data) while (! rules.eof()) { rules.getline(str, str_size, ';'); - rules.ignore(2, '\n'); + if (rules.eof()) + break; string entry = str; FirewallEntry rule; rule.Parse(entry); @@ -405,7 +408,8 @@ void Config::ParseDeleteList(string data) while (! files.eof()) { files.getline(str, str_size, ';'); - files.ignore(2, '\n'); + if (files.eof()) + break; string entry = str; FileEntry file; file.Parse(entry, FileEntry::DeleteAction); @@ -430,11 +434,8 @@ void Config::ParseDownloadList(string data) while (! files.eof()) { files.getline(str, str_size, ';'); - // there is no \n or \r\n - // so string processing is quite different if (files.eof()) break; - string entry = str; FileEntry file; file.Parse(entry, FileEntry::DownloadAction); -- cgit v1.2.3