summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2012-03-24 21:22:33 +0200
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2012-03-24 21:22:33 +0200
commit34943070b997cf95ae2ca8a815dbe5312a644b23 (patch)
treeb4477fde91c3b309d815ac2c8590422af7b093d8 /server
parent9f121ae4e7c2671a7a193324e8ca71e6685b4ea2 (diff)
more log
Diffstat (limited to 'server')
-rwxr-xr-xserver/server/main.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/server/server/main.cpp b/server/server/main.cpp
index fa97e32..5eb43c4 100755
--- a/server/server/main.cpp
+++ b/server/server/main.cpp
@@ -421,6 +421,12 @@ void session::proto_parser(std::vector<byte>& data)
lists_mutex.lock();
for(std::list<config::static_proxy_entry>::iterator it = cfg->get_static_proxy_list()->begin(), end = cfg->get_static_proxy_list()->end(); it != end; ++it)
{
+ if(cfg->debug())
+ {
+ logger->lock();
+ *logger<< time_str() << ": packing "<<it->host<<":"<<it->port<<" speed "<<it->speed<<"\n";
+ logger->unlock();
+ }
switch(it->type)
{
case config::HTTPS:
@@ -491,7 +497,11 @@ void session::proto_parser(std::vector<byte>& data)
data.push_back(' ');
{
char speed[10];
+#ifdef WIN32
+ _snprintf(speed, 10, "%lu", it->speed);
+#else
snprintf(speed, 10, "%lu", it->speed);
+#endif
int len = strlen(speed);
for(int i = 0; i < len; ++i)
data.push_back(speed[i]);