summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorAlex Borisov <borisov.alexandr@rambler.ru>2011-12-03 15:14:25 +0200
committerAlex Borisov <borisov.alexandr@rambler.ru>2011-12-03 15:14:25 +0200
commit7e912594bcf490ffcbcd49c3530da66effb70cda (patch)
tree59c5a76a890f1d11e4a1432da3ad993c5b677e34 /client
parente2926e321c4472d2dd65c4c75f13eafd9f97db08 (diff)
FIX request data to be parsed wo \n
Diffstat (limited to 'client')
-rw-r--r--client/Config.cpp15
1 files changed, 8 insertions, 7 deletions
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);