diff options
author | Alex Borisov <borisov.alexandr@rambler.ru> | 2011-11-17 01:16:39 +0200 |
---|---|---|
committer | Alex Borisov <borisov.alexandr@rambler.ru> | 2011-11-17 01:16:39 +0200 |
commit | 3b45f27f389976718efaccdf71878e5455303da2 (patch) | |
tree | 4db4ee5720912375fb7b2287bb75a1b4a9a768ad /client/Config.cpp | |
parent | b068f321dd9c6077c590473c4f108be87e7eb99d (diff) |
Subsequent config updates. FIX data parsing bug
Diffstat (limited to 'client/Config.cpp')
-rw-r--r-- | client/Config.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/client/Config.cpp b/client/Config.cpp index 6b1d4f9..abf090a 100644 --- a/client/Config.cpp +++ b/client/Config.cpp @@ -187,6 +187,10 @@ void Config::ParseConfig(string data) } else if (key.compare("server") == 0) { + /** + * @todo clear list of previous servers on config update<br/> + * when server will be able to sent valid config.cfg data + */ ServerEntry server(value); servers.push_back(server); } @@ -223,8 +227,10 @@ void Config::ParseConfig(string data) void Config::ParseGenericProxies(string data) { - stringstream proxies(data, ios_base::in); + /* clear previous proxies */ + genericProxy.clear(); + stringstream proxies(data, ios_base::in); const int str_size = 512; char str[str_size] = {0}; while (! proxies.eof()) @@ -242,8 +248,10 @@ void Config::ParseGenericProxies(string data) void Config::ParseStaticPorxies(string data) { - stringstream proxies(data, ios_base::in); + /* clear previous proxies */ + staticProxy.clear(); + stringstream proxies(data, ios_base::in); const int str_size = 512; char str[str_size] = {0}; while (! proxies.eof()) |