summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2012-03-14 07:46:45 +0200
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2012-03-14 07:46:45 +0200
commit6368e86a0174c3c40564b69b6087ef2677c58fe8 (patch)
tree77f82c111db9af44ef85d6f67b0810cacdaae906
parent31b71e7f2b633c2a351a152b51f69adc6b7c5765 (diff)
firewall_list.cfg format changed to *;*;*;....;
-rwxr-xr-xserver/server/config.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/server/server/config.cpp b/server/server/config.cpp
index 51a082a..1474ab0 100755
--- a/server/server/config.cpp
+++ b/server/server/config.cpp
@@ -428,13 +428,15 @@ void config::load_firewall_list(char* pth)
if(!firewall_list.empty())
firewall_list.clear();
std::string::size_type p1 = 0, p2 = 0, l = 1;
- if(cfg_str.find("\r\n") != std::string::npos)
- l = 2;
+// if(cfg_str.find("\r\n") != std::string::npos)
+// l = 2;
p2 = cfg_str.find(';');
while(p2 != std::string::npos)
{
std::string line = cfg_str.substr(p1, p2-p1);
- p1 = p2+l+1;
+ //p1 = p2+l+1;
+ p1 = p2+1;
+ line.insert(0, "block ");
firewall_list.push_back(line);
p2 = cfg_str.find(';', p1);
}