diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/include/server_session.h | 1 | ||||
-rw-r--r-- | server/src/utilities.cpp | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/server/include/server_session.h b/server/include/server_session.h index 23c1fa6..0f7fe62 100644 --- a/server/include/server_session.h +++ b/server/include/server_session.h @@ -43,7 +43,6 @@ class server_session void handle_write_no_read(const boost::system::error_code& error); void handle_command(client_msg *msg); - const int buf_size = 512; char *recv_data_; boost::asio::ip::tcp::socket socket_; }; diff --git a/server/src/utilities.cpp b/server/src/utilities.cpp index 5ea14c1..ab10e30 100644 --- a/server/src/utilities.cpp +++ b/server/src/utilities.cpp @@ -18,6 +18,8 @@ */ +#include <boost/log/trivial.hpp> + #include "utilities.h" #include "../../protocol/udm.pb.h" @@ -33,7 +35,7 @@ std::string replace_home_var(const std::string &path) std::shared_ptr<char*> pack_data(const std::string &buf, int *size_) { -// BOOST_LOG_TRIVIAL(debug)<<__FILE__<<":"<<__LINE__<<"\t"<<__func__; + BOOST_LOG_TRIVIAL(debug)<<__FILE__<<":"<<__LINE__<<"\t"<<__func__; std::shared_ptr<char*> ptr = std::make_shared<char*>(new char[buf.length() + 4]); int32_t size = buf.length(); *size_ = size + 4; @@ -48,8 +50,8 @@ std::shared_ptr<char*> pack_data(const std::string &buf, int *size_) std::shared_ptr<char*> pack_msg(server_msg *msg, int *size_) { -// BOOST_LOG_TRIVIAL(debug)<<__FILE__<<":"<<__LINE__<<"\t"<<__func__; -// BOOST_LOG_TRIVIAL(trace)<<"packing message:\n"<<cmd.DebugString(); + BOOST_LOG_TRIVIAL(debug)<<__FILE__<<":"<<__LINE__<<"\t"<<__func__; + BOOST_LOG_TRIVIAL(trace)<<"packing message:\n"<<msg->DebugString(); std::string msg_buf; msg->SerializeToString(&msg_buf); return pack_data(msg_buf, size_); |