summaryrefslogtreecommitdiff
path: root/client/Config.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2011-12-06 01:36:04 +0200
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2011-12-06 01:36:04 +0200
commitcf9dda85c464ad6697b1b8960101d54dae986c98 (patch)
tree11d428da2b1fc4ad5055cee5c9ecd552b0dc75e4 /client/Config.cpp
parent1a5d1e21d83fc5ef305c6138421ffb6f41cadcda (diff)
parent9974bde9106a1d7e05fbe12266d8bbfe00436a62 (diff)
Merge branch 'master' of ssh://sss.chaoslab.ru//home/private_git/proxy_ui
Diffstat (limited to 'client/Config.cpp')
-rw-r--r--client/Config.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/client/Config.cpp b/client/Config.cpp
index 40c24b2..38ff50f 100644
--- a/client/Config.cpp
+++ b/client/Config.cpp
@@ -73,20 +73,17 @@ void Config::FileEntry::Parse(string entry, ActionType _action)
/*
* ServerEntry nested class section
*/
-Config::ServerEntry::ServerEntry(string entry)
-{
- ServerEntry();
-
+Config::ServerEntry::ServerEntry(string& entry): host("127.0.0.1"), timeout(120), retryTimeout(60)
+{
/* processing server entry e.g.: "8.8.8.8 600 60" */
size_t start = 0, end = 0;
end = entry.find(' ');
host = entry.substr(start, end);
start = end+1;
- end = entry.find(' ');
+ end = entry.find(' ', start);
timeout = atoi(entry.substr(start, end).c_str());
start = end+1;
- end = entry.find(' ');
- retryTimeout = atoi(entry.substr(start, end).c_str());
+ retryTimeout = atoi(entry.substr(start).c_str());
}