formatter % static_cast<void*>(ip_replication_area_begin)
% ip_replication_area_size % virtual_service_endpoint.address().to_string()
% virtual_service_endpoint.port();
- putLogDebug(600202, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600204, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600203, "out_function : Constructor ip_replication_data_processor::"
+ putLogDebug(600205, "out_function : Constructor ip_replication_data_processor::"
"ip_replication_data_processor("
"char* ip_replication_area_begin, int ip_replication_area_size, "
"const boost::asio::ip::tcp::endpoint& virtual_service_endpoint, "
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600204, "function : ip_replication_data_processor::"
+ putLogDebug(600206, "function : ip_replication_data_processor::"
"ip_replication_data_processor() : Replication area is null.", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600205, "function : ip_replication_data_processor::"
+ putLogDebug(600207, "function : ip_replication_data_processor::"
"ip_replication_data_processor() : Over replication area.",
__FILE__, __LINE__);
- putLogDebug(600206, "out_function : Constructor ip_replication_data_processor::"
+ putLogDebug(600208, "out_function : Constructor ip_replication_data_processor::"
"ip_replication_data_processor(int maxlist, "
"char* ip_replication_area_begin, int ip_replication_area_size, "
"const boost::asio::ip::tcp::endpoint& virtual_service_endpoint, "
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600207, "function : ip_replication_data_processor::"
+ putLogDebug(600209, "function : ip_replication_data_processor::"
"ip_replication_data_processor() : Replication area is full.",
__FILE__, __LINE__);
}
"size = %d, offset = %d).");
formatter % pick->virtualserver_ip % pick->virtualserver_port
% pick->size % pick->offset;
- putLogDebug(600208, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600210, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
}
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600209, "function : ip_replication_data_processor::"
+ putLogDebug(600211, "function : ip_replication_data_processor::"
"ip_replication_data_processor() : Replication area is full.",
__FILE__, __LINE__);
}
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600210, "out_function : Constructor ip_replication_data_processor::"
+ putLogDebug(600212, "out_function : Constructor ip_replication_data_processor::"
"ip_replication_data_processor("
"char* ip_replication_area_begin, int ip_replication_area_size, "
"const boost::asio::ip::tcp::endpoint& virtual_service_endpoint, "
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600211, "in/out_function : Destructor ip_replication_data_processor::"
+ putLogDebug(600213, "in/out_function : Destructor ip_replication_data_processor::"
"~ip_replication_data_processor().", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"data.ip_hash = %d, data.last_time = %lu, data.rs_endpoint = [%s]:%d.");
formatter % data.op_code % data.ip_hash % data.last_time % data.rs_endpoint.address().to_string()
% data.rs_endpoint.port();
- putLogDebug(600212, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600214, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600213, "out_function : void ip_replication_data_processor::"
+ putLogDebug(600215, "out_function : void ip_replication_data_processor::"
"put_into_temp_list(const ip_replication_temp_data& data).", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600214, "in_function : void ip_replication_data_processor::"
+ putLogDebug(600216, "in_function : void ip_replication_data_processor::"
"write_replicaion_area().", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600215, "out_function : void ip_replication_data_processor::"
+ putLogDebug(600217, "out_function : void ip_replication_data_processor::"
"write_replicaion_area().", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"realserver_prot = %d, last_time = %d.");
formatter % replication_area[temp_data.ip_hash].realserver_ip % replication_area[temp_data.ip_hash].realserver_port %
replication_area[temp_data.ip_hash].last_time;
- putLogDebug(600216, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600218, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
boost::format formatter("function : void ip_replication_data_processor::"
"write_replicaion_area() : 'U' : last_time = %d.");
formatter % replication_area[temp_data.ip_hash].last_time;
- putLogDebug(600217, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600219, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600218, "out_function : void ip_replication_data_processor::"
+ putLogDebug(600220, "out_function : void ip_replication_data_processor::"
"write_replicaion_area().", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"ip_replication_data_processor::"
"get_replication_area() : return_value = &(%d).");
formatter % static_cast<void*>(replication_area);
- putLogDebug(600219, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600221, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600220, "in_function : void ip_replication_data_processor::"
+ putLogDebug(600222, "in_function : void ip_replication_data_processor::"
"register_replication_area_lock(boost::function<void(void)> intable_lock).",
__FILE__, __LINE__);
}
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600221, "out_function : void ip_replication_data_processor::"
+ putLogDebug(600223, "out_function : void ip_replication_data_processor::"
"register_replication_area_lock(boost::function<void(void)> intable_lock).",
__FILE__, __LINE__);
}
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600222, "in_function : void ip_replication_data_processor::"
+ putLogDebug(600224, "in_function : void ip_replication_data_processor::"
"register_replication_area_unlock(boost::function<void(void)> intable_unlock).",
__FILE__, __LINE__);
}
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600223, "out_function : void ip_replication_data_processor::"
+ putLogDebug(600225, "out_function : void ip_replication_data_processor::"
"register_replication_area_unlock(boost::function<void(void)> intable_unlock).",
__FILE__, __LINE__);
}
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600224, "in_function : void ip_replication_data_processor::"
+ putLogDebug(600226, "in_function : void ip_replication_data_processor::"
"get_from_temp_list(ip_replication_temp_data& data).", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"data.last_time = %lu, data.rs_endpoint = [%s]:%d.");
formatter % ret % data.op_code % data.ip_hash % data.last_time %
data.rs_endpoint.address().to_string() % data.rs_endpoint.port();
- putLogDebug(600225, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600227, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"logger_func_type inputLogInfo, logger_func_type inputLogDebug) : "
"timeout = %d, replication_data_processor = &(%d).");
formatter % timeout % static_cast<void*>(replication_data_processor);
- putLogDebug(600187, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600189, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600188, "out_function : Constructor ip_session_data_processor::"
+ putLogDebug(600190, "out_function : Constructor ip_session_data_processor::"
"ip_session_data_processor(int timeout, "
"ip_replication_data_processor* replication_data_processor, "
"getloglevel_func_type ingetloglevel, logger_func_type inputLogFatal, "
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600189, "out_function : Constructor ip_session_data_processor::"
+ putLogDebug(600191, "out_function : Constructor ip_session_data_processor::"
"ip_session_data_processor(int timeout, "
"ip_replication_data_processor* replication_data_processor, "
"getloglevel_func_type ingetloglevel, logger_func_type inputLogFatal, "
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600190, "in/out_function : Destructor ip_session_data_processor::"
+ putLogDebug(600192, "in/out_function : Destructor ip_session_data_processor::"
"~ip_session_data_processor().", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"boost::asio::ip::tcp::endpoint& endpoint) : "
"ip_hash = %d.");
formatter % ip_hash;
- putLogDebug(600191, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600193, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
boost::format formatter("out_function : int ip_session_data_processor::"
"get_endpoint_from_ip_data(int ip_hash, "
"boost::asio::ip::tcp::endpoint& endpoint) : return_value = 1.");
- putLogDebug(600192, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600194, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
return 1;
"get_endpoint_from_ip_data(int ip_hash, "
"boost::asio::ip::tcp::endpoint& endpoint) : return_value = %d.");
formatter % ret;
- putLogDebug(600193, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600195, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"const boost::asio::ip::tcp::endpoint& endpoint, "
"time_t now_time) : ip_hash = %d, now_time = %d.");
formatter % ip_hash % now_time;
- putLogDebug(600194, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600196, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"write_session_data(int ip_hash,"
"const boost::asio::ip::tcp::endpoint& endpoint, "
"time_t now_time) : return_value = 1.");
- putLogDebug(600195, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600197, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
return 1;
}
// write session data to session table
- session_table[ip_hash].rs_endpoint = endpoint;
session_table[ip_hash].last_time = now_time;
// set op_code
}
else
{
+ session_table[ip_hash].rs_endpoint = endpoint;
temp_data.op_code = 'A';
}
"write_session_data() : put_into_temp_list() "
"--add item ip_hash = %d -- end.");
formatter % ip_hash;
- putLogDebug(600196, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600198, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
}
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600197, "out_function : int ip_session_data_processor::"
+ putLogDebug(600199, "out_function : int ip_session_data_processor::"
"write_session_data(int hash, "
"const boost::asio::ip::tcp::endpoint& endpoint, time_t now_time) : "
"return_value = -1.", __FILE__, __LINE__);
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600198, "out_function : int ip_session_data_processor::"
+ putLogDebug(600200, "out_function : int ip_session_data_processor::"
"write_ip_data(const std::string& ip, "
"const boost::asio::ip::tcp::endpoint& endpoint, time_t now_time) : "
"return_value = 0.", __FILE__, __LINE__);
"read_session_data_from_replication_area(ip_replication_data* replication_area) : "
"replication_area = &(%d).");
formatter % static_cast<void*>(replication_area);
- putLogDebug(600199, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600201, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600200, "out_function : int ip_session_data_processor::"
+ putLogDebug(600202, "out_function : int ip_session_data_processor::"
"read_session_data_from_replication_area("
"ip_replication_data* replication_area) : return_value = -1.", __FILE__, __LINE__);
}
"read_session_data_from_replication_area(ip_replication_data* replication_area) : "
"return_value = %d.");
formatter % ret;
- putLogDebug(600201, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600203, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600002, "in/out_function : void protocol_module_ip::"
- "replication_interrupt().", __FILE__, __LINE__ );
+ putLogDebug(600002, "in_function : protocol_module_ip::replication_interrupt().", __FILE__, __LINE__);
+ }
+ /*------DEBUG LOG END------*/
+ if (replication_data_processor)
+ {
+ replication_data_processor->write_replication_area();
+ /*-------- DEBUG LOG --------*/
+ if (unlikely(LOG_LV_DEBUG == getloglevel()))
+ {
+ putLogDebug(600003, "function : protocol_module_ip::replication_interrupt() : "
+ "write_replication_area() end.", __FILE__, __LINE__);
+ }
+ /*------DEBUG LOG END------*/
+ }
+ /*-------- DEBUG LOG --------*/
+ if (unlikely(LOG_LV_DEBUG == getloglevel()))
+ {
+ putLogDebug(600004, "out_function : void protocol_module_ip::replication_interrupt().", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
}
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600003, "in_function : void protocol_module_ip::initialize("
+ putLogDebug(600005, "in_function : void protocol_module_ip::initialize("
"rs_list_itr_func_type inlist_begin, rs_list_itr_func_type inlist_end, "
"rs_list_itr_next_func_type inlist_next, boost::function< void(void) > "
"inlist_lock, boost::function< void(void) > inlist_unlock).", __FILE__, __LINE__);
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600004, "out_function : void protocol_module_ip::initialize("
+ putLogDebug(600006, "out_function : void protocol_module_ip::initialize("
"rs_list_itr_func_type inlist_begin, rs_list_itr_func_type inlist_end, "
"rs_list_itr_next_func_type inlist_next, boost::function< void(void) > "
"inlist_lock, boost::function< void(void) > inlist_unlock).", __FILE__, __LINE__);
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600005, "in_function : void protocol_module_ip::finalize().", __FILE__, __LINE__);
+ putLogDebug(600007, "in_function : void protocol_module_ip::finalize().", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600006, "function : void protocol_module_ip::finalize() : "
+ putLogDebug(600008, "function : void protocol_module_ip::finalize() : "
"rs_list_begin.clear(), rs_list_end.clear(), rs_list_next.clear(), "
"rs_list_lock.clear(), rs_list_unlock.clear() end.", __FILE__, __LINE__);
}
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600007, "function : void protocol_module_ip::finalize() : "
+ putLogDebug(600009, "function : void protocol_module_ip::finalize() : "
"schedule_tcp.clear() end.", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
{
boost::format formatter("delete : address = &(%d).");
formatter % static_cast<void*>(replication_data_processor);
- putLogDebug(600008, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600010, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
{
boost::format formatter("delete : address = &(%d).");
formatter % static_cast<void*>(ip_data_processor);
- putLogDebug(600009, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600011, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600010, "out_function : void protocol_module_ip::finalize().", __FILE__, __LINE__);
+ putLogDebug(600012, "out_function : void protocol_module_ip::finalize().", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600011, "in/out_function : bool protocol_module_ip::is_use_sorry() : return_value = true.",
+ putLogDebug(600013, "in/out_function : bool protocol_module_ip::is_use_sorry() : return_value = true.",
__FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600012, "in/out_function : void protocol_module_ip::handle_rslist_update().",
+ putLogDebug(600014, "in/out_function : void protocol_module_ip::handle_rslist_update().",
__FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
argsdump += *it;
}
formatter % argsdump;
- putLogDebug(600013, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600015, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
bool sorryuri_checked = false;
sregex sorry_uri_regex
= +( '/' >>
- *( alpha |
- digit |
- ( set = ';', ':', '@', '&', '=' ) |
- ( set = '$', '-', '_', '.', '+' ) |
- ( set = '!', '*', '\'', '\(', ')', ',' ) |
- '%' >> repeat<2>(xdigit)));
+ *( alpha |
+ digit |
+ ( set = ';', ':', '@', '&', '=' ) |
+ ( set = '$', '-', '_', '.', '+' ) |
+ ( set = '!', '*', '\'', '\(', ')', ',' ) |
+ '%' >> repeat<2>(xdigit)));
typedef std::vector<std::string>::const_iterator vec_str_it;
"const std::vector<std::string>& args) : return_value = ("
"check_message_result.flag = %d, check_message_result.message = %s).");
formatter % check_result.flag % check_result.message;
- putLogDebug(600014, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600016, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
argsdump += " ";
}
formatter % argsdump;
- putLogDebug(600015, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600017, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter;
sregex sorry_uri_regex
= +( '/' >>
- *( alpha |
- digit |
- ( set = ';', ':', '@', '&', '=' ) |
- ( set = '$', '-', '_', '.', '+' ) |
- ( set = '!', '*', '\'', '\(', ')', ',' ) |
- '%' >> repeat<2>(xdigit)));
+ *( alpha |
+ digit |
+ ( set = ';', ':', '@', '&', '=' ) |
+ ( set = '$', '-', '_', '.', '+' ) |
+ ( set = '!', '*', '\'', '\(', ')', ',' ) |
+ '%' >> repeat<2>(xdigit)));
typedef std::vector<std::string>::const_iterator vec_str_it;
{
// not set no-reschedule flag
reschedule_flag = true;
- reschedule = 1;
+ reschedule = 1;
}
else
{
{
// not set reschedule flag
no_reschedule_flag = true;
- reschedule = 0;
+ reschedule = 0;
}
else
{
//set forwarded flag ON
forward_checked = true;
- forwarded_for = FORWARDED_FOR_ON;
+ forwarded_for = FORWARDED_FOR_ON;
}
//option string = "-S"
else if (*it == "-S" || *it == "--sorry-uri")
if (regex_match(*it, sorry_uri_regex))
{
sorryuri_checked = true;
- memcpy(sorry_uri.data(), it->c_str(), it->size());
+ memcpy(sorry_uri.data(), it->c_str(), it->size());
}
//check NG
else
"protocol_module_ip::set_parameter(const std::vector<std::string>& args) : "
"timeout = %d, reschedule = %d.");
formatter % timeout % reschedule;
- putLogDebug(600016, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600018, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600017, "function : protocol_module_ip::check_message_result protocol_module_ip::"
+ putLogDebug(600019, "function : protocol_module_ip::check_message_result protocol_module_ip::"
"set_parameter() : replication_pay_memory() end.", __FILE__, __LINE__);
boost::format formatter("function : protocol_module_ip::check_message_result protocol_module_ip::"
"set_parameter() : data_addr = &(%d), data_size = %d.");
formatter % data_addr % data_size;
- putLogDebug(600018, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600020, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600019, "function : protocol_module_ip::check_message_result "
+ putLogDebug(600021, "function : protocol_module_ip::check_message_result "
"protocol_module_ip::set_parameter() : "
"Replication area is null.", __FILE__, __LINE__);
}
boost::format formatter("new : address = &(%d), size = %lu.");
formatter % static_cast<void*>(replication_data_processor)
% sizeof(ip_replication_data_processor);
- putLogDebug(600020, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600022, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600021, "function : protocol_module_ip::check_message_result protocol_module_ip::"
+ putLogDebug(600023, "function : protocol_module_ip::check_message_result protocol_module_ip::"
"set_parameter() : register_replication_area_lock() end.", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600022, "function : protocol_module_ip::check_message_result protocol_module_ip::"
+ putLogDebug(600024, "function : protocol_module_ip::check_message_result protocol_module_ip::"
"set_parameter() : register_replication_area_unlock() end.", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
boost::format formatter("new : address = &(%d), size = %lu.");
formatter % static_cast<void*>(ip_data_processor)
% sizeof(ip_session_data_processor);
- putLogDebug(600023, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600025, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600024, "function : protocol_module_ip::check_message_result protocol_module_ip::"
+ putLogDebug(600026, "function : protocol_module_ip::check_message_result protocol_module_ip::"
"set_parameter() : get_replication_area() end.", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600025, "function : protocol_module_ip::check_message_result protocol_module_ip::"
+ putLogDebug(600027, "function : protocol_module_ip::check_message_result protocol_module_ip::"
"set_parameter() : replication_area_lock() end.", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600026, "function : protocol_module_ip::check_message_result protocol_module_ip::"
+ putLogDebug(600028, "function : protocol_module_ip::check_message_result protocol_module_ip::"
"set_parameter() : read_session_data_from_replication_area() end.", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600027, "function : protocol_module_ip::check_message_result protocol_module_ip::"
+ putLogDebug(600029, "function : protocol_module_ip::check_message_result protocol_module_ip::"
"set_parameter() : replication_area_unlock() end.", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"const std::vector<std::string>& args) : return_value = ("
"check_message_result.flag = %d, check_message_result.message = %s).");
formatter % check_result.flag % check_result.message;
- putLogDebug(600028, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600030, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
return check_result;
argsdump += *it;
}
formatter % argsdump;
- putLogDebug(600029, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600031, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
check_message_result check_result;
"protocol_module_ip::add_parameter(const std::vector<std::string>& args) : "
"return_value = (check_message_result.flag = %d, check_message_result.message = %s).");
formatter % check_result.flag % check_result.message;
- putLogDebug(600030, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600032, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
return check_result;
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600031, "in_function : void protocol_module_ip::get_option_info("
+ putLogDebug(600033, "in_function : void protocol_module_ip::get_option_info("
"std::string& option).", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
boost::format option_formatter("--timeout %d%s %s --sorry-uri '%s'");
option_formatter % timeout % (forwarded_for ? " --forwarded-for" : "") % (reschedule ? "--reschedule" : "--no-reschedule") % sorry_uri.c_array();
- option.assign(option_formatter.str());
+ option.assign(option_formatter.str());
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
boost::format formatter("out_function : void protocol_module_ip::get_option_info("
"std::string& option) : option = %s.");
formatter % option;
- putLogDebug(600032, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600034, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
}
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600033, "in_function : void protocol_module_ip::register_schedule("
+ putLogDebug(600035, "in_function : void protocol_module_ip::register_schedule("
"tcp_schedule_func_type inschedule).", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600034, "out_function : void protocol_module_ip::register_schedule("
+ putLogDebug(600036, "out_function : void protocol_module_ip::register_schedule("
"tcp_schedule_func_type inschedule).", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(600035, "in/out_function : void protocol_module_ip::register_schedule("
+ putLogDebug(600037, "in/out_function : void protocol_module_ip::register_schedule("
"udp_schedule_func_type inschedule).", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"const boost::asio::ip::udp::endpoint& client_endpoint_udp) : "
"up_thread_id = %d, down_thread_id = %d.");
formatter % up_thread_id % down_thread_id;
- putLogDebug(600036, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600038, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
{
boost::format formatter("new : address = &(%d), size = %lu.");
formatter % static_cast<void*>(p_up.get()) % sizeof(session_thread_data_ip);
- putLogDebug(600037, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600039, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
% p_up->ip_hash;
- putLogDebug(600038, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600040, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
{
boost::format formatter("new : address = &(%d), size = %lu.");
formatter % static_cast<void*>(p_down.get()) % sizeof(session_thread_data_ip);
- putLogDebug(600039, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600041, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
% p_down->current_message_rest_size
% p_down->data_state
% p_down->ip_hash;
- putLogDebug(600040, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600042, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"const boost::asio::ip::udp::endpoint& client_endpoint_udp) : return_value = %d. "
"thread id : %d.");
formatter % status % boost::this_thread::get_id();
- putLogDebug(600041, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600043, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"const boost::thread::id down_thread_id) : "
"up_thread_id = %d, down_thread_id = %d.");
formatter % up_thread_id % down_thread_id;
- putLogDebug(600042, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600044, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
EVENT_TAG status = STOP;
{
boost::format formatter("delete : address = &(%d).");
formatter % static_cast<void*>(p_up->data_buffer);
- putLogDebug(600043, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600045, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
{
boost::format formatter("delete : address = &(%d).");
formatter % static_cast<void*>(p_up.get());
- putLogDebug(600044, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600046, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
{
boost::format formatter("delete : address = &(%d).");
formatter % static_cast<void*>(p_up->data_buffer);
- putLogDebug(600045, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600047, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
{
boost::format formatter("delete : address = &(%d).");
formatter % static_cast<void*>(p_down.get());
- putLogDebug(600046, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600048, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"handle_session_finalize(const boost::thread::id up_thread_id, "
"const boost::thread::id down_thread_id) : return_value = %d. thread id : %d.");
formatter % status % boost::this_thread::get_id();
- putLogDebug(600047, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600049, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
return status;
boost::format formatter("in_function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_accept(const boost::thread::id thread_id) : thread_id = %d.");
formatter % thread_id;
- putLogDebug(600048, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600050, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_accept(const boost::thread::id thread_id) : ACCEPT_END_FLAG_ON. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(600049, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600051, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_accept() : catch exception e = %d. thread id : %d.");
formatter % e % boost::this_thread::get_id();
- putLogDebug(600050, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600052, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
status = FINALIZE;
boost::format formatter("out_function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_accept(const boost::thread::id thread_id) : return_value = %d. thread id : %d.");
formatter % status % boost::this_thread::get_id();
- putLogDebug(600051, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600053, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"const boost::array<char,MAX_BUFFER_SIZE>& recvbuffer, "
"const size_t recvlen) : thread_id = %d, recvbuffer = %s, recvlen = %d.");
formatter % thread_id % buffer % recvlen;
- putLogDebug(600052, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600054, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"const boost::array<char,MAX_BUFFER_SIZE>& recvbuffer, "
"const size_t recvlen) : return_value = %d. thread id : %d.");
formatter % FINALIZE % boost::this_thread::get_id();
- putLogDebug(600053, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600055, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
return status;
{
//search http header
find_ret = http_utility::find_http_header_all(session_data_ptr->data_buffer + session_data_ptr->data_offset,
- session_data_ptr->data_length,
- http_header_offset,
- http_header_len
- );
+ session_data_ptr->data_length,
+ http_header_offset,
+ http_header_len
+ );
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
"handle_client_recv() : call find_http_header_all : "
"return_value = %d. thread id : %d.");
formatter % static_cast<int>(find_ret) % boost::this_thread::get_id();
- putLogDebug(600054, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600056, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"handle_client_recv() : call check_http_method_and_version : "
"return_value = %d. thread id : %d.");
formatter % check_ret % boost::this_thread::get_id();
- putLogDebug(600055, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600057, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"handle_client_recv() : call find_http_header_content_length : "
"return_value = %d. thread id : %d.");
formatter % static_cast<int>(find_ret) % boost::this_thread::get_id();
- putLogDebug(600056, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600058, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_client_recv() : catch exception e = %d. thread id : %d.");
formatter % e % boost::this_thread::get_id();
- putLogDebug(600057, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600059, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
status = FINALIZE;
"const boost::array<char,MAX_BUFFER_SIZE>& recvbuffer, "
"const size_t recvlen) : return_value = %d. thread id : %d.");
formatter % status % boost::this_thread::get_id();
- putLogDebug(600058, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600060, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"boost::asio::ip::tcp::endpoint& rs_endpoint) : "
"thread_id = %d, rs_endpoint = [%s]:%d.");
formatter % thread_id % rs_endpoint.address().to_string() % rs_endpoint.port();
- putLogDebug(600059, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600061, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"boost::asio::ip::tcp::endpoint& rs_endpoint)"
" : return_value = %d. thread id : %d.");
formatter % FINALIZE % boost::this_thread::get_id();
- putLogDebug(600060, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600062, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
return FINALIZE;
"protocol_module_ip::handle_realserver_select() : "
"get_endpoint_from_session_data() end. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(600061, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600063, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"handle_realserver_select() : call schedule_tcp : "
"rs_endpoint = [%s]:%d. thread id : %d.");
formatter % rs_endpoint.address().to_string() % rs_endpoint.port() % boost::this_thread::get_id();
- putLogDebug(600062, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600064, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"protocol_module_ip::handle_realserver_select() : "
"write_session_data() end. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(600063, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600065, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_ip::"
- "handle_realserver_select()"
- " : SORRY_FLAG_ON. thread id : %d.");
+ "handle_realserver_select()"
+ " : SORRY_FLAG_ON. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(600064, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600066, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"handle_realserver_select() : call schedule_tcp : "
"rs_endpoint = [%s]:%d. thread id : %d.");
formatter % rs_endpoint.address().to_string() % rs_endpoint.port() % boost::this_thread::get_id();
- putLogDebug(600065, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600067, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"protocol_module_ip::handle_realserver_select() : "
"write_session_data() end. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(600066, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600068, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_ip::"
- "handle_realserver_select()"
- " : SORRY_FLAG_ON. thread id : %d.");
+ "handle_realserver_select()"
+ " : SORRY_FLAG_ON. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(600067, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600069, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
//set return status
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_realserver_select() : catch exception e = %d. thread id : %d.");
formatter % e % boost::this_thread::get_id();
- putLogDebug(600068, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600070, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
status = FINALIZE;
"boost::asio::ip::tcp::endpoint& rs_endpoint)"
" : return_value = %d. thread id : %d.");
formatter % status % boost::this_thread::get_id();
- putLogDebug(600069, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600071, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
return status;
"size_t& datalen) : "
"return_value = %d. thread id : %d.");
formatter % STOP % boost::this_thread::get_id();
- putLogDebug(600070, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600072, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
return STOP;
"boost::array<char, MAX_BUFFER_SIZE>& sendbuffer, size_t& datalen) : "
"thread_id = %d.");
formatter % thread_id;
- putLogDebug(600071, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600073, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"handle_realserver_connect() : before memcpy (data dump) : "
"data begin = 0, data_size = %d, data = %s");
formatter % x_forwarded_for_context.size() % datadump;
- putLogDebug(600072, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600074, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"handle_realserver_connect() : after memcpy (data dump) : "
"data begin = 0, data_size = %d, data = %s");
formatter % x_forwarded_for_context.size() % datadump;
- putLogDebug(600073, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600075, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_realserver_connect() : catch exception e = %d. thread id : %d.");
formatter % e % boost::this_thread::get_id();
- putLogDebug(600074, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600076, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"boost::array<char,MAX_BUFFER_SIZE>& sendbuffer, "
"size_t& datalen) : return_value = %d. thread id : %d.");
formatter % status % boost::this_thread::get_id();
- putLogDebug(600075, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600077, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"const boost::asio::ip::tcp::endpoint& rs_endpoint) : "
"thread_id = %d, rs_endpoint = [%s]:%d.");
formatter % thread_id % rs_endpoint.address().to_string() % rs_endpoint.port();
- putLogDebug(600076, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600078, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_realserver_connection_fail() : catch exception e = %d. thread id : %d.");
formatter % e % boost::this_thread::get_id();
- putLogDebug(600077, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600079, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"handle_realserver_connection_fail(const boost::thread::id thread_id, "
"const boost::asio::ip::tcp::endpoint& rs_endpoint) : return_value = %d. thread id : %d.");
formatter % status % boost::this_thread::get_id();
- putLogDebug(600078, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600080, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("in_function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_realserver_send(const boost::thread::id thread_id) : thread_id = %d.");
formatter % thread_id;
- putLogDebug(600079, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600081, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
{
//search whole http header, get whole http header's offset and length
find_ret = http_utility::find_http_header_all(session_data_ptr->data_buffer + session_data_ptr->data_offset,
- session_data_ptr->data_length,
- http_header_all_offset,
- http_header_all_len
- );
+ session_data_ptr->data_length,
+ http_header_all_offset,
+ http_header_all_len
+ );
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
"handle_realserver_send() : call find_http_header_all : "
"return_value = %d. thread id : %d.");
formatter % static_cast<int>(find_ret) % boost::this_thread::get_id();
- putLogDebug(600080, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600082, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"handle_realserver_send() : call check_http_method_and_version : "
"return_value = %d. thread id : %d.");
formatter % check_ret % boost::this_thread::get_id();
- putLogDebug(600081, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600083, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"handle_realserver_send() : call find_http_header_content_length : "
"return_value = %d. thread id : %d.");
formatter % static_cast<int>(find_ret) % boost::this_thread::get_id();
- putLogDebug(600082, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600084, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_realserver_send() : catch exception e = %d. thread id : %d.");
formatter % e % boost::this_thread::get_id();
- putLogDebug(600083, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600085, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("out_function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_realserver_send(const boost::thread::id thread_id) : return_value = %d. thread id : %d.");
formatter % status % boost::this_thread::get_id();
- putLogDebug(600084, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600086, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"boost::asio::ip::tcp::endpoint& sorry_endpoint) : "
"thread_id = %d, sorry_endpoint = [%s]:%d.");
formatter % thread_id % sorry_endpoint.address().to_string() % sorry_endpoint.port();
- putLogDebug(600085, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600087, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_sorryserver_select() : catch exception e = %d. thread id : %d.");
formatter % e % boost::this_thread::get_id();
- putLogDebug(600086, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600088, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"boost::asio::ip::tcp::endpoint& sorry_endpoint)"
" : return_value = %d. thread id : %d.");
formatter % status % boost::this_thread::get_id();
- putLogDebug(600087, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600089, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"boost::array<char, MAX_BUFFER_SIZE>& sendbuffer, size_t& datalen) : "
"thread_id = %d.");
formatter % thread_id;
- putLogDebug(600088, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600090, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
{
//search uri
http_utility::find_uri(session_data_ptr->data_buffer + session_data_ptr->data_offset,
- session_data_ptr->data_length, uri_offset, uri_len);
+ session_data_ptr->data_length, uri_offset, uri_len);
//set buffer's position
buffer_element.first = session_data_ptr->data_buffer + session_data_ptr->data_offset;
"handle_sorryserver_connect() : before memcpy (data dump) : "
"data begin = 0, data_size = %d, data = %s");
formatter % x_forwarded_for_context.size() % datadump;
- putLogDebug(600089, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600091, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"handle_sorryserver_connect() : after memcpy (data dump) : "
"data begin = 0, data_size = %d, data = %s");
formatter % x_forwarded_for_context.size() % datadump;
- putLogDebug(600090, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600092, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_sorryserver_connect() : catch exception e = %d. thread id : %d.");
formatter % e % boost::this_thread::get_id();
- putLogDebug(600091, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600093, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"boost::array<char,MAX_BUFFER_SIZE>& sendbuffer, "
"size_t& datalen) : return_value = %d. thread id : %d.");
formatter % status % boost::this_thread::get_id();
- putLogDebug(600092, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600094, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"const boost::asio::ip::tcp::endpoint& sorry_endpoint) : "
"thread_id = %d, sorry_endpoint = [%s]:%d.");
formatter % thread_id % sorry_endpoint.address().to_string() % sorry_endpoint.port();
- putLogDebug(600093, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600095, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_sorryserver_connection_fail() : catch exception e = %d. thread id : %d.");
formatter % e % boost::this_thread::get_id();
- putLogDebug(600094, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600096, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"handle_sorryserver_connection_fail(const boost::thread::id thread_id, "
"const boost::asio::ip::tcp::endpoint& sorry_endpoint) : return_value = %d. thread id : %d.");
formatter % status % boost::this_thread::get_id();
- putLogDebug(600095, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600097, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("in_function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_sorryserver_send(const boost::thread::id thread_id) : thread_id = %d.");
formatter % thread_id;
- putLogDebug(600096, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600098, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
{
//search whole http header, get whole http header's offset and length
find_ret = http_utility::find_http_header_all(session_data_ptr->data_buffer + session_data_ptr->data_offset,
- session_data_ptr->data_length,
- http_header_all_offset,
- http_header_all_len
- );
+ session_data_ptr->data_length,
+ http_header_all_offset,
+ http_header_all_len
+ );
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
"handle_sorryserver_send() : call find_http_header_all : "
"return_value = %d. thread id : %d.");
formatter % static_cast<int>(find_ret) % boost::this_thread::get_id();
- putLogDebug(600097, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600099, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"handle_sorryserver_send() : call check_http_method_and_version : "
"return_value = %d. thread id : %d.");
formatter % check_ret % boost::this_thread::get_id();
- putLogDebug(600098, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600100, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"handle_sorryserver_send() : call find_http_header_content_length : "
"return_value = %d. thread id : %d.");
formatter % static_cast<int>(find_ret) % boost::this_thread::get_id();
- putLogDebug(600099, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600101, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_sorryserver_send() : catch exception e = %d. thread id : %d.");
formatter % e % boost::this_thread::get_id();
- putLogDebug(600100, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600102, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("out_function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_sorryserver_send(const boost::thread::id thread_id) : return_value = %d. thread id : %d.");
formatter % status % boost::this_thread::get_id();
- putLogDebug(600101, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600103, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"const size_t& recvlen) : "
"return_value = %d. thread id : %d.");
formatter % STOP % boost::this_thread::get_id();
- putLogDebug(600102, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600104, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
return STOP;
"const size_t recvlen) : thread_id = %d, rs_endpoint = [%s]:%d, recvbuffer = %s, recvlen = %d.");
formatter % thread_id % rs_endpoint.address().to_string() % rs_endpoint.port()
% buffer % recvlen;
- putLogDebug(600103, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600105, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"const boost::array<char,MAX_BUFFER_SIZE>& recvbuffer, "
"const size_t recvlen) : return_value = %d. thread id : %d.");
formatter % FINALIZE % boost::this_thread::get_id();
- putLogDebug(600104, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600106, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"const size_t recvlen) : SWITCH_FLAG_OFF. "
"thread_id = %d, rs_endpoint = [%s]:%d.");
formatter % thread_id % rs_endpoint.address().to_string() % rs_endpoint.port();
- putLogDebug(600105, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600107, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
{
//search http header
find_ret = http_utility::find_http_header_all(session_data_ptr->data_buffer + session_data_ptr->data_offset,
- session_data_ptr->data_length,
- http_header_offset,
- http_header_len
- );
+ session_data_ptr->data_length,
+ http_header_offset,
+ http_header_len
+ );
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
"handle_realserver_recv() : call find_http_header_all : "
"return_value = %d. thread id : %d.");
formatter % static_cast<int>(find_ret) % boost::this_thread::get_id();
- putLogDebug(600106, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600108, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"handle_realserver_recv() : call check_http_version_and_status_code : "
"return_value = %d. thread id : %d.");
formatter % check_ret % boost::this_thread::get_id();
- putLogDebug(600107, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600109, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"handle_realserver_recv() : call find_http_header_content_length : "
"return_value = %d. thread id : %d.");
formatter % static_cast<int>(find_ret) % boost::this_thread::get_id();
- putLogDebug(600108, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600110, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_realserver_recv() : catch exception e = %d. thread id : %d.");
formatter % e % boost::this_thread::get_id();
- putLogDebug(600109, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600111, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"const boost::array<char,MAX_BUFFER_SIZE>& recvbuffer, "
"const size_t recvlen) : return_value = %d. thread id : %d.");
formatter % FINALIZE % boost::this_thread::get_id();
- putLogDebug(600110, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600112, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"const size_t recvlen) : thread_id = %d, sorry_endpoint = [%s]:%d, recvbuffer = %s, recvlen = %d.");
formatter % thread_id % sorry_endpoint.address().to_string() % sorry_endpoint.port()
% buffer % recvlen;
- putLogDebug(600111, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600113, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"const boost::array<char,MAX_BUFFER_SIZE>& recvbuffer, "
"const size_t recvlen) : return_value = %d. thread id : %d.");
formatter % FINALIZE % boost::this_thread::get_id();
- putLogDebug(600112, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600114, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"const size_t recvlen) : SWITCH_FLAG_OFF. "
"thread_id = %d, rs_endpoint = [%s]:%d.");
formatter % thread_id % sorry_endpoint.address().to_string() % sorry_endpoint.port();
- putLogDebug(600113, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600115, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
{
//search http header
find_ret = http_utility::find_http_header_all(session_data_ptr->data_buffer + session_data_ptr->data_offset,
- session_data_ptr->data_length,
- http_header_offset,
- http_header_len
- );
+ session_data_ptr->data_length,
+ http_header_offset,
+ http_header_len
+ );
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
"handle_sorryserver_recv() : call find_http_header_all : "
"return_value = %d. thread id : %d.");
formatter % static_cast<int>(find_ret) % boost::this_thread::get_id();
- putLogDebug(600114, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600116, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"handle_sorryserver_recv() : call check_http_version_and_status_code : "
"return_value = %d. thread id : %d.");
formatter % check_ret % boost::this_thread::get_id();
- putLogDebug(600115, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600117, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"handle_sorryserver_recv() : call find_http_header_content_length : "
"return_value = %d. thread id : %d.");
formatter % static_cast<int>(find_ret) % boost::this_thread::get_id();
- putLogDebug(600116, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600118, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_sorryserver_recv() : catch exception e = %d. thread id : %d.");
formatter % e % boost::this_thread::get_id();
- putLogDebug(600117, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600119, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"const boost::array<char,MAX_BUFFER_SIZE>& recvbuffer, "
"const size_t recvlen) : return_value = %d. thread id : %d.");
formatter % FINALIZE % boost::this_thread::get_id();
- putLogDebug(600118, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600120, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"handle_response_send_inform(const boost::thread::id thread_id) : "
"return_value = %d. thread id : %d.");
formatter % STOP % boost::this_thread::get_id();
- putLogDebug(600119, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600121, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"boost::array<char, MAX_BUFFER_SIZE>& sendbuffer, size_t& datalen) : "
"thread_id = %d.");
formatter % thread_id;
- putLogDebug(600120, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600122, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"handle_client_connection_check() : before memcpy (data dump) : "
"data begin = %d, data_size = %d, data = %s");
formatter % session_data_ptr->data_offset % send_possible_size % datadump;
- putLogDebug(600121, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600123, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"handle_client_connection_check() : after memcpy (data dump) : "
"data begin = 0, data_size = %d, data = %s");
formatter % send_possible_size % datadump;
- putLogDebug(600122, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600124, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_client_connection_check() : catch exception e = %d. thread id : %d.");
formatter % e % boost::this_thread::get_id();
- putLogDebug(600123, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600125, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"handle_client_connection_check(const boost::thread::id thread_id, "
"boost::array<char, MAX_BUFFER_SIZE>& sendbuffer, size_t& datalen) : return_value = %d. thread id : %d.");
formatter % status % boost::this_thread::get_id();
- putLogDebug(600124, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600126, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"const size_t& datalen) : "
"return_value = %d. thread id : %d.");
formatter % STOP % boost::this_thread::get_id();
- putLogDebug(600125, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600127, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
return STOP;
boost::format formatter("in_function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_client_send(const boost::thread::id thread_id) : thread_id = %d.");
formatter % thread_id;
- putLogDebug(600126, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600128, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
{
//search whole http header, get whole http header's offset and length
find_ret = http_utility::find_http_header_all(session_data_ptr->data_buffer + session_data_ptr->data_offset,
- session_data_ptr->data_length,
- http_header_all_offset,
- http_header_all_len
- );
+ session_data_ptr->data_length,
+ http_header_all_offset,
+ http_header_all_len
+ );
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
"handle_client_send() : call find_http_header_all : "
"return_value = %d. thread id : %d.");
formatter % static_cast<int>(find_ret) % boost::this_thread::get_id();
- putLogDebug(600127, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600129, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"handle_client_send() : call check_http_version_and_status_code : "
"return_value = %d. thread id : %d.");
formatter % check_ret % boost::this_thread::get_id();
- putLogDebug(600128, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600130, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"handle_client_send() : call find_http_header_content_length : "
"return_value = %d. thread id : %d.");
formatter % static_cast<int>(find_ret) % boost::this_thread::get_id();
- putLogDebug(600129, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600131, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_client_send() : catch exception e = %d. thread id : %d.");
formatter % e % boost::this_thread::get_id();
- putLogDebug(600130, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600132, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("out_function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_client_send(const boost::thread::id thread_id) : return_value = %d. thread id : %d.");
formatter % status % boost::this_thread::get_id();
- putLogDebug(600131, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600133, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("in/out_function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_client_disconnect(const boost::thread::id thread_id) : return_value = %d. thread id : %d.");
formatter % FINALIZE % boost::this_thread::get_id();
- putLogDebug(600132, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600134, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
return FINALIZE;
boost::format formatter("in_function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_sorry_enable(const boost::thread::id thread_id) : thread_id = %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(600133, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600135, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_sorry_enable(const boost::thread::id thread_id) : SWITCH_FLAG_ON. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(600134, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600136, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_sorry_enable(const boost::thread::id thread_id) : SWITCH_FLAG_ON. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(600135, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600137, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
}
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_sorry_enable(const boost::thread::id thread_id) : END_FLAG_ON. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(600136, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600138, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
}
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_sorry_enable(const boost::thread::id thread_id) : SWITCH_FLAG_ON. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(600137, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600139, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_sorry_enable(const boost::thread::id thread_id) : SORRY_FLAG_ON. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(600138, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600140, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_sorry_enable() : catch exception e = %d. thread id : %d.");
formatter % e % boost::this_thread::get_id();
- putLogDebug(600139, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600141, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("out_function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_sorry_enable(const boost::thread::id thread_id) : return_value = %d. thread id : %d.");
formatter % status % boost::this_thread::get_id();
- putLogDebug(600140, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600142, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("in_function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_sorry_disable(const boost::thread::id thread_id) : thread_id = %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(600141, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600143, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_sorry_disable(const boost::thread::id thread_id) : SWITCH_FLAG_ON. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(600142, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600144, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_sorry_disable(const boost::thread::id thread_id) : END_FLAG_ON. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(600143, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600145, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
}
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_sorry_disable(const boost::thread::id thread_id) : SWITCH_FLAG_ON. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(600144, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600146, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_sorry_disable(const boost::thread::id thread_id) : SWITCH_FLAG_ON. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(600145, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600147, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_sorry_disable(const boost::thread::id thread_id) : SORRY_FLAG_OFF. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(600146, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600148, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_sorry_disable() : catch exception e = %d. thread id : %d.");
formatter % e % boost::this_thread::get_id();
- putLogDebug(600147, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600149, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("out_function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_sorry_disable(const boost::thread::id thread_id) : return_value = %d. thread id : %d.");
formatter % status % boost::this_thread::get_id();
- putLogDebug(600148, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600150, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"handle_realserver_disconnect(const boost::thread::id thread_id, const boost::asio::ip::tcp::endpoint& rs_endpoint) : "
"thread_id = %d, rs_endpoint = [%s]:%d.");
formatter % thread_id % rs_endpoint.address().to_string() % rs_endpoint.port();
- putLogDebug(600149, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600151, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_realserver_disconnect(const boost::thread::id thread_id, const boost::asio::ip::tcp::endpoint &" "rs_endpoint) : SWITCH_FLAG_OFF. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(600150, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600152, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
}
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_realserver_disconnect() : catch exception e = %d. thread id : %d.");
formatter % e % boost::this_thread::get_id();
- putLogDebug(600151, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600153, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"handle_realserver_disconnect(const boost::thread::id thread_id, "
"const boost::asio::ip::tcp::endpoint& rs_endpoint) : return_value = %d. thread id : %d.");
formatter % status % boost::this_thread::get_id();
- putLogDebug(600152, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600154, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"handle_sorryserver_disconnect(const boost::thread::id thread_id, const boost::asio::ip::tcp::endpoint& sorry_endpoint) : "
"thread_id = %d, sorry_endpoint = [%s]:%d.");
formatter % thread_id % sorry_endpoint.address().to_string() % sorry_endpoint.port();
- putLogDebug(600153, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600155, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_sorryserver_disconnect(const boost::thread::id thread_id, const boost::asio::ip::tcp::endpoint &" "sorry_endpoint) : SWITCH_FLAG_OFF. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(600154, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600156, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_ip::"
"handle_sorryserver_disconnect() : catch exception e = %d. thread id : %d.");
formatter % e % boost::this_thread::get_id();
- putLogDebug(600155, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600157, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"handle_sorryserver_disconnect(const boost::thread::id thread_id, "
"const boost::asio::ip::tcp::endpoint& sorry_endpoint) : return_value = %d. thread id : %d.");
formatter % status % boost::this_thread::get_id();
- putLogDebug(600156, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600158, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"boost::asio::ip::udp::endpoint& rs_endpoint) : "
"return_value = %d. thread id : %d.");
formatter % STOP % boost::this_thread::get_id();
- putLogDebug(600157, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600159, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"thread_data_ptr data_ptr, const boost::array<char,MAX_BUFFER_SIZE>& recvbuffer, "
"const size_t& recvlen) : thread_id = %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(600158, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600160, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"thread_data_ptr data_ptr, const boost::array<char,MAX_BUFFER_SIZE>& recvbuffer, "
"const size_t& recvlen) : return_value = false. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(600159, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600161, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"get_data_from_recvbuffer() : before memcpy (data dump) : "
"data begin = 0, data_size = %d, data = %s");
formatter % recvlen % datadump;
- putLogDebug(600160, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600162, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"get_data_from_recvbuffer() : after memcpy (data dump) : "
"data begin = 0, data_size = %d, data = %s");
formatter % recvlen % datadump;
- putLogDebug(600161, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600163, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"thread_data_ptr data_ptr, const boost::array<char,MAX_BUFFER_SIZE>& recvbuffer, "
"const size_t& recvlen) : return_value = true. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(600162, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600164, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
return true;
"get_data_from_recvbuffer() : before memcpy (data dump) : "
"data begin = 0, data_size = %d, data = %s");
formatter % recvlen % datadump;
- putLogDebug(600163, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600165, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"get_data_from_recvbuffer() : after memcpy (data dump) : "
"data begin = 0, data_size = %d, data = %s");
formatter % recvlen % datadump;
- putLogDebug(600164, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600166, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"thread_data_ptr data_ptr, const boost::array<char,MAX_BUFFER_SIZE>& recvbuffer, "
"const size_t& recvlen) : return_value = true. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(600165, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600167, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"thread_data_ptr data_ptr, const boost::array<char,MAX_BUFFER_SIZE>& recvbuffer, "
"const size_t& recvlen) : return_value = false. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(600166, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600168, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
{
boost::format formatter("new : address = &(%d), size = %lu.");
formatter % static_cast<void*>(tmpbuffer) % MAX_IP_MODULE_BUFFER_SIZE;
- putLogDebug(600167, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600169, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"thread_data_ptr data_ptr, const boost::array<char,MAX_BUFFER_SIZE>& recvbuffer, "
"const size_t& recvlen) : return_value = false. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(600168, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600170, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"get_data_from_recvbuffer() : before memcpy (data dump) : "
"data begin = 0, data_size = %d, data = %s");
formatter % data_ptr->data_length % datadump;
- putLogDebug(600169, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600171, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"get_data_from_recvbuffer() : after memcpy (data dump) : "
"data begin = 0, data_size = %d, data = %s");
formatter % data_ptr->data_length % datadump;
- putLogDebug(600170, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600172, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
{
boost::format formatter("delete : address = &(%d).");
formatter % static_cast<void*>(data_ptr->data_buffer);
- putLogDebug(600171, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600173, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"get_data_from_recvbuffer() : before memcpy (data dump) : "
"data begin = 0, data_size = %d, data = %s");
formatter % recvlen % datadump;
- putLogDebug(600172, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600174, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"get_data_from_recvbuffer() : after memcpy (data dump) : "
"data begin = 0, data_size = %d, data = %s");
formatter % recvlen % datadump;
- putLogDebug(600173, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600175, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"thread_data_ptr data_ptr, const boost::array<char,MAX_BUFFER_SIZE>& recvbuffer, "
"const size_t& recvlen) : return_value = true. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(600174, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600176, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"thread_data_ptr data_ptr, boost::array<char,MAX_BUFFER_SIZE>& sendbuffer, "
"size_t& datalen) : thread_id = %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(600175, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600177, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"thread_data_ptr data_ptr, boost::array<char,MAX_BUFFER_SIZE>& sendbuffer, "
"size_t& datalen) : return_value = false. thread_id = %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(600176, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600178, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"put_data_to_sendbuffer() : before memcpy (data dump) : "
"data begin = 0, data_size = %d, data = %s");
formatter % buffer_element.second % datadump;
- putLogDebug(600177, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600179, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"put_data_to_sendbuffer() : after memcpy (data dump) : "
"data begin = 0, data_size = %d, data = %s");
formatter % buffer_element.second % datadump;
- putLogDebug(600178, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600180, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"put_data_to_sendbuffer() : before memcpy (data dump) : "
"data begin = 0, data_size = %d, data = %s");
formatter % sendbuffer_rest_size % datadump;
- putLogDebug(600179, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600181, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"put_data_to_sendbuffer() : after memcpy (data dump) : "
"data begin = 0, data_size = %d, data = %s");
formatter % sendbuffer_rest_size % datadump;
- putLogDebug(600180, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600182, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"thread_data_ptr data_ptr, boost::array<char,MAX_BUFFER_SIZE>& sendbuffer, "
"size_t& datalen) : return_value = true. thread_id = %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(600181, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600183, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"const std::string& client_endpoint, const char* buffer, const size_t buffer_len, "
"size_t& x_forwarded_for_insert_pos, std::string& x_forwarded_for_context) : thread_id = %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(600182, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600184, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"call find_http_header_x_forwarded_for : "
"return_value = %d. thread id : %d.");
formatter % static_cast<int>(find_ret) % boost::this_thread::get_id();
- putLogDebug(600183, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600185, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"const std::string& client_endpoint, const char* buffer, const size_t buffer_len, "
"size_t& x_forwarded_for_insert_pos, std::string& x_forwarded_for_context) : return_value = false. thread_id = %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(600184, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600186, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"call find_http_header_all : "
"return_value = true. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(600185, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(600187, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"const std::string& client_endpoint, const char* buffer, const size_t buffer_len, "
"size_t& x_forwarded_for_insert_pos, std::string& x_forwarded_for_context) : return_value = true. thread_id = %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(600186, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(600188, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
if (ret == -1)
{
+ putLogError(300036, "record data is null.", __FILE__, __LINE__);
+
// anomaly, set the end_flag ON
threaddata->end_flag = END_FLAG_ON;
status = FINALIZE;
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_client_recv() : exception : error = %s. thread id : %d.");
formatter % e.what() % boost::this_thread::get_id();
- putLogError(300036, formatter.str(), __FILE__, __LINE__);
+ putLogError(300037, formatter.str(), __FILE__, __LINE__);
status = FINALIZE;
}
"protocol_module_sslid::handle_client_recv() "
": Unknown exception. thread id : %d");
formatter % boost::this_thread::get_id();
- putLogError(300037, formatter.str(), __FILE__, __LINE__);
+ putLogError(300038, formatter.str(), __FILE__, __LINE__);
status = FINALIZE;
}
{
boost::format formatter("Invalid thread id. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300038, formatter.str(), __FILE__, __LINE__);
+ putLogError(300039, formatter.str(), __FILE__, __LINE__);
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
}
/*------DEBUG LOG END------*/
- // first connection
- if (!threaddata->hello_message_flag)
+ // first connection get sessionid from the data buffer
+ std::string session_id;
+ if (threaddata->hello_message_flag &&
+ (get_ssl_session_id(threaddata->data_buffer.data()+threaddata->data_begain_offset,
+ threaddata->data_size, session_id) == -1))
{
- // the first connection, the theaddata must be hellomessage
- threaddata->end_flag = END_FLAG_ON;
- status = FINALIZE;
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
- "handle_realserver_select() : END_FLAG_ON. thread id : %d.");
- formatter % boost::this_thread::get_id();
+ boost::format formatter("out_function : protocol_module_base::EVENT_TAG "
+ "protocol_module_sslid::handle_realserver_select("
+ "const boost::thread::id thread_id, boost::asio::"
+ "ip::tcp::endpoint& rs_endpoint) : return_value = %d, "
+ "thread id : %d.");
+ formatter % FINALIZE % boost::this_thread::get_id();
putLogDebug(300062, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
+
+ putLogInfo(300001, "Realserver decision failure.", __FILE__, __LINE__);
}
- else
+
+ /*-------- DEBUG LOG --------*/
+ if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- // get sessionid from the data buffer
- std::string session_id;
- if (get_ssl_session_id(threaddata->data_buffer.data()+threaddata->data_begain_offset,
- threaddata->data_size, session_id) == -1)
+ std::string buffer;
+ dump_session_id(session_id.c_str(), session_id.size(), buffer);
+ boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
+ "handle_realserver_select() : get_ssl_session_id() session_id = %s end. "
+ "thread id : %d.");
+ formatter % buffer % boost::this_thread::get_id();
+ putLogDebug(300063, formatter.str(), __FILE__, __LINE__);
+ }
+ /*------DEBUG LOG END------*/
+
+ if (session_id.empty())
+ {
+ // no session id in hellomesseage
+ // schedule the endpoint
+ boost::asio::ip::tcp::endpoint temp_endpoint;
+ boost::asio::ip::tcp::endpoint comp_endpoint; // for compare the endpoint
+ schedule_tcp(thread_id, rs_list_begin, rs_list_end, rs_list_next, temp_endpoint);
+ if (temp_endpoint != comp_endpoint)
{
+ // success for get the endpoint by reschedule
+ threaddata->selected_realserver = temp_endpoint;
+ rs_endpoint = temp_endpoint;
+ status = REALSERVER_CONNECT;
+ }
+ else
+ {
+ // failed to get the endpoint by schedule, try to select sorry server
+ // set sorry_flag ON, and set the status SORRYSERVER_SELECT
+ threaddata->sorry_flag = SORRY_FLAG_ON;
+ status = SORRYSERVER_SELECT;
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- boost::format formatter("out_function : protocol_module_base::EVENT_TAG "
- "protocol_module_sslid::handle_realserver_select("
- "const boost::thread::id thread_id, boost::asio::"
- "ip::tcp::endpoint& rs_endpoint) : return_value = %d, "
- "thread id : %d.");
- formatter % FINALIZE % boost::this_thread::get_id();
- putLogDebug(300063, formatter.str(), __FILE__, __LINE__);
+ boost::format formatter("function : protocol_module_base::EVENT_TAG "
+ "protocol_module_sslid::handle_realserver_select() : "
+ "SORRY_FLAG_ON. thread id : %d.");
+ formatter % boost::this_thread::get_id();
+ putLogDebug(300064, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
-
- putLogInfo(300001, "Realserver decision failure.", __FILE__, __LINE__);
-
- threaddata->end_flag = END_FLAG_ON;
-
- // set last status
- threaddata->last_status = FINALIZE;
-
- return FINALIZE;
}
-
+ }
+ else
+ {
+ // the session id is in the hellomessage
+ // try to get the endpoint from session data by session id
+ int ret = session_data_processor->get_endpoint_from_session_data(
+ session_id,
+ threaddata->selected_realserver);
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- std::string buffer;
- dump_session_id(session_id.c_str(), session_id.size(), buffer);
- boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
- "handle_realserver_select() : get_ssl_session_id() session_id = %s end. "
- "thread id : %d.");
- formatter % buffer % boost::this_thread::get_id();
- putLogDebug(300064, formatter.str(), __FILE__, __LINE__);
+ boost::format formatter("function : protocol_module_base::EVENT_TAG "
+ "protocol_module_sslid::handle_realserver_select() : "
+ "get_endpoint_from_session_data() end. thread id : %d.");
+ formatter % boost::this_thread::get_id();
+ putLogDebug(300065, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
- if (session_id.empty())
+ if (ret == 0)
{
- // no session id in hellomesseage
- // schedule the endpoint
- boost::asio::ip::tcp::endpoint temp_endpoint;
- boost::asio::ip::tcp::endpoint comp_endpoint; // for compare the endpoint
- schedule_tcp(thread_id, rs_list_begin, rs_list_end, rs_list_next, temp_endpoint);
- if (temp_endpoint != comp_endpoint)
- {
- // success for get the endpoint by reschedule
- threaddata->selected_realserver = temp_endpoint;
- rs_endpoint = temp_endpoint;
- status = REALSERVER_CONNECT;
- }
- else
+ //find the rs_endpoint in the rs_list
+ rs_list_lock();
+
+ rs_list_itr = rs_list_begin();
+ int is_match = 0;
+
+ while (rs_list_itr != rs_list_end())
{
- // failed to get the endpoint by schedule, try to select sorry server
- // set sorry_flag ON, and set the status SORRYSERVER_SELECT
- threaddata->sorry_flag = SORRY_FLAG_ON;
- status = SORRYSERVER_SELECT;
- /*-------- DEBUG LOG --------*/
- if (unlikely(LOG_LV_DEBUG == getloglevel()))
+ if (rs_list_itr->tcp_endpoint == threaddata->selected_realserver)
{
- boost::format formatter("function : protocol_module_base::EVENT_TAG "
- "protocol_module_sslid::handle_realserver_select() : "
- "SORRY_FLAG_ON. thread id : %d.");
- formatter % boost::this_thread::get_id();
- putLogDebug(300065, formatter.str(), __FILE__, __LINE__);
+ is_match = 1;
+ break;
}
- /*------DEBUG LOG END------*/
- }
- }
- else
- {
- // the session id is in the hellomessage
- // try to get the endpoint from session data by session id
- int ret = session_data_processor->get_endpoint_from_session_data(
- session_id,
- threaddata->selected_realserver);
- /*-------- DEBUG LOG --------*/
- if (unlikely(LOG_LV_DEBUG == getloglevel()))
- {
- boost::format formatter("function : protocol_module_base::EVENT_TAG "
- "protocol_module_sslid::handle_realserver_select() : "
- "get_endpoint_from_session_data() end. thread id : %d.");
- formatter % boost::this_thread::get_id();
- putLogDebug(300066, formatter.str(), __FILE__, __LINE__);
+
+ rs_list_itr = rs_list_next(rs_list_itr);
}
- /*------DEBUG LOG END------*/
- if (ret == 0)
+ if (is_match)
{
- //find the rs_endpoint in the rs_list
- rs_list_lock();
-
- rs_list_itr = rs_list_begin();
- int is_match = 0;
-
- while (rs_list_itr != rs_list_end())
- {
- if (rs_list_itr->tcp_endpoint == threaddata->selected_realserver)
- {
- is_match = 1;
- break;
- }
-
- rs_list_itr = rs_list_next(rs_list_itr);
- }
-
- if (is_match)
- {
- // get the endpoint successfully
- rs_endpoint = threaddata->selected_realserver;
- status = REALSERVER_CONNECT;
- }
- else
- {
- // failed to get the endpoint
- if (reschedule == 1)
- {
- // reschedule mode
- boost::asio::ip::tcp::endpoint temp_endpoint;
- boost::asio::ip::tcp::endpoint comp_endpoint; // for compare the endpoint
- schedule_tcp(thread_id, rs_list_begin, rs_list_end, rs_list_next, temp_endpoint);
- if (temp_endpoint != comp_endpoint)
- {
- // get the endpoint by reschedule successfully
- threaddata->selected_realserver = temp_endpoint;
- rs_endpoint = temp_endpoint;
- status = REALSERVER_CONNECT;
- }
- else
- {
- // failed to get the endpoint by reschedule, try to select sorry server
- // set sorry_flag ON, and set the status SORRYSERVER_SELECT
- threaddata->sorry_flag = SORRY_FLAG_ON;
- status = SORRYSERVER_SELECT;
- /*-------- DEBUG LOG --------*/
- if (unlikely(LOG_LV_DEBUG == getloglevel()))
- {
- boost::format formatter("function : protocol_module_base::EVENT_TAG "
- "protocol_module_sslid::handle_realserver_select() : "
- "SORRY_FLAG_ON. thread id : %d.");
- formatter % boost::this_thread::get_id();
- putLogDebug(300067, formatter.str(), __FILE__, __LINE__);
- }
- /*------DEBUG LOG END------*/
- }
- }
- else
- {
- // no reschedule mode
- // set end_flag ON and disconnect the client
- threaddata->end_flag = END_FLAG_ON;
- status = CLIENT_DISCONNECT;
- /*-------- DEBUG LOG --------*/
- if (unlikely(LOG_LV_DEBUG == getloglevel()))
- {
- boost::format formatter("function : protocol_module_base::EVENT_TAG "
- "protocol_module_sslid::handle_realserver_select() "
- ": END_FLAG_ON. thread id : %d.");
- formatter % boost::this_thread::get_id();
- putLogDebug(300068, formatter.str(), __FILE__, __LINE__);
- }
- /*------DEBUG LOG END------*/
- }
- }
+ // get the endpoint successfully
+ rs_endpoint = threaddata->selected_realserver;
+ status = REALSERVER_CONNECT;
}
else
{
schedule_tcp(thread_id, rs_list_begin, rs_list_end, rs_list_next, temp_endpoint);
if (temp_endpoint != comp_endpoint)
{
- // get the endpoint by reschedule successfully
- threaddata->selected_realserver = temp_endpoint;
- rs_endpoint = temp_endpoint;
- status = REALSERVER_CONNECT;
+ // get the endpoint by reschedule successfully
+ threaddata->selected_realserver = temp_endpoint;
+ rs_endpoint = temp_endpoint;
+ status = REALSERVER_CONNECT;
}
else
{
"protocol_module_sslid::handle_realserver_select() : "
"SORRY_FLAG_ON. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(300069, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300066, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
}
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
+ boost::format formatter("function : protocol_module_base::EVENT_TAG "
+ "protocol_module_sslid::handle_realserver_select() "
+ ": END_FLAG_ON. thread id : %d.");
+ formatter % boost::this_thread::get_id();
+ putLogDebug(300067, formatter.str(), __FILE__, __LINE__);
+ }
+ /*------DEBUG LOG END------*/
+ }
+ }
+ }
+ else
+ {
+ // failed to get the endpoint
+ if (reschedule == 1)
+ {
+ // reschedule mode
+ boost::asio::ip::tcp::endpoint temp_endpoint;
+ boost::asio::ip::tcp::endpoint comp_endpoint; // for compare the endpoint
+ schedule_tcp(thread_id, rs_list_begin, rs_list_end, rs_list_next, temp_endpoint);
+ if (temp_endpoint != comp_endpoint)
+ {
+ // get the endpoint by reschedule successfully
+ threaddata->selected_realserver = temp_endpoint;
+ rs_endpoint = temp_endpoint;
+ status = REALSERVER_CONNECT;
+ }
+ else
+ {
+ // failed to get the endpoint by reschedule, try to select sorry server
+ // set sorry_flag ON, and set the status SORRYSERVER_SELECT
+ threaddata->sorry_flag = SORRY_FLAG_ON;
+ status = SORRYSERVER_SELECT;
+ /*-------- DEBUG LOG --------*/
+ if (unlikely(LOG_LV_DEBUG == getloglevel()))
+ {
boost::format formatter("function : protocol_module_base::EVENT_TAG "
- "protocol_module_sslid::handle_realserver_select() "
- ": END_FLAG_ON. thread id : %d.");
+ "protocol_module_sslid::handle_realserver_select() : "
+ "SORRY_FLAG_ON. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(300070, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300068, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
}
}
+ else
+ {
+ // no reschedule mode
+ // set end_flag ON and disconnect the client
+ threaddata->end_flag = END_FLAG_ON;
+ status = CLIENT_DISCONNECT;
+ /*-------- DEBUG LOG --------*/
+ if (unlikely(LOG_LV_DEBUG == getloglevel()))
+ {
+ boost::format formatter("function : protocol_module_base::EVENT_TAG "
+ "protocol_module_sslid::handle_realserver_select() "
+ ": END_FLAG_ON. thread id : %d.");
+ formatter % boost::this_thread::get_id();
+ putLogDebug(300069, formatter.str(), __FILE__, __LINE__);
+ }
+ /*------DEBUG LOG END------*/
+ }
}
}
}
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_realserver_select() : exception : error = %s. thread id : %d.");
formatter % e.what() % boost::this_thread::get_id();
- putLogError(300039, formatter.str(), __FILE__, __LINE__);
+ putLogError(300040, formatter.str(), __FILE__, __LINE__);
putLogInfo(300002, "Realserver decision failure.", __FILE__, __LINE__);
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_realserver_select() : Unknown exception. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300040, formatter.str(), __FILE__, __LINE__);
+ putLogError(300041, formatter.str(), __FILE__, __LINE__);
putLogInfo(300003, "Realserver decision failure.", __FILE__, __LINE__);
"end_flag = %d, rs_endpoint = [%s]:%d. thread id : %d.");
formatter % status % (threaddata.get() ? threaddata->end_flag : END_FLAG_ON)
% rs_endpoint.address().to_string() % rs_endpoint.port() % boost::this_thread::get_id();
- putLogDebug(300071, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300070, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"boost::array<char,MAX_BUFFER_SIZE>& sendbuffer, size_t& datalen) : "
"return_value = %d. thread id : %d.");
formatter % STOP % boost::this_thread::get_id();
- putLogDebug(300072, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300071, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
return STOP;
"boost::array<char,MAX_BUFFER_SIZE>& sendbuffer, size_t& datalen) : "
"thread_id = %d.");
formatter % thread_id;
- putLogDebug(300073, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300072, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
{
boost::format formatter("Invalid thread id. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300041, formatter.str(), __FILE__, __LINE__);
+ putLogError(300042, formatter.str(), __FILE__, __LINE__);
status = FINALIZE;
}
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_realserver_connect() exception : error = %s. thread id : %d.");
formatter % e.what() % boost::this_thread::get_id();
- putLogError(300042, formatter.str(), __FILE__, __LINE__);
+ putLogError(300043, formatter.str(), __FILE__, __LINE__);
status = FINALIZE;
}
catch (...)
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_realserver_connect() : Unknown exception. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300043, formatter.str(), __FILE__, __LINE__);
+ putLogError(300044, formatter.str(), __FILE__, __LINE__);
status = FINALIZE;
}
"boost::array<char,MAX_BUFFER_SIZE>& sendbuffer, size_t& datalen) : "
"return_value = %d. thread id : %d.");
formatter % status % boost::this_thread::get_id();
- putLogDebug(300074, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300073, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"const boost::asio::ip::tcp::endpoint& rs_endpoint) : "
"thread_id = %d, rs_endpoint = [%s]:%d.");
formatter % thread_id % rs_endpoint.address().to_string() % rs_endpoint.port();
- putLogDebug(300075, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300074, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
{
boost::format formatter("Invalid thread id. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300044, formatter.str(), __FILE__, __LINE__);
+ putLogError(300045, formatter.str(), __FILE__, __LINE__);
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
"const boost::asio::ip::tcp::endpoint& rs_endpoint) : return_value = %d. "
"thread id : %d.");
formatter % FINALIZE % boost::this_thread::get_id();
- putLogDebug(300076, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300075, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
return FINALIZE;
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_realserver_connection_fail() : END_FLAG_ON. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(300077, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300076, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_realserver_connection_fail() : exception : error = %s. thread id : %d.");
formatter % e.what() % boost::this_thread::get_id();
- putLogError(300045, formatter.str(), __FILE__, __LINE__);
+ putLogError(300046, formatter.str(), __FILE__, __LINE__);
status = FINALIZE;
}
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_realserver_connection_fail() : Unknown exception. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300046, formatter.str(), __FILE__, __LINE__);
+ putLogError(300047, formatter.str(), __FILE__, __LINE__);
status = FINALIZE;
}
"const boost::asio::ip::tcp::endpoint& rs_endpoint) : "
"return_value = %d, end_flag = %d. thread id : %d.");
formatter % status % (threaddata.get() ? threaddata->end_flag : END_FLAG_ON) % boost::this_thread::get_id();
- putLogDebug(300078, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300077, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
boost::format formatter("in_function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_realserver_send(const boost::thread::id thread_id) : thread_id = %d.");
formatter % thread_id;
- putLogDebug(300079, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300078, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
{
boost::format formatter("Invalid thread id. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300047, formatter.str(), __FILE__, __LINE__);
+ putLogError(300048, formatter.str(), __FILE__, __LINE__);
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
"handle_realserver_send(const boost::thread::id thread_id) : "
"return_value = %d. thread id : %d.");
formatter % FINALIZE % boost::this_thread::get_id();
- putLogDebug(300080, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300079, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_realserver_send() : check_ssl_record_sendable() end. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(300081, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300080, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
if (ret == -1)
{
+ putLogError(300049, "record data is null.", __FILE__, __LINE__);
+
// anomaly, set the end_flag ON
threaddata->end_flag = END_FLAG_ON;
status = FINALIZE;
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_realserver_send() : END_FLAG_ON. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(300082, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300081, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
}
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_realserver_send() : exception : error = %s. thread id : %d.");
formatter % e.what() % boost::this_thread::get_id();
- putLogError(300048, formatter.str(), __FILE__, __LINE__);
+ putLogError(300050, formatter.str(), __FILE__, __LINE__);
status = FINALIZE;
}
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_realserver_send() : Unknown exception. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300049, formatter.str(), __FILE__, __LINE__);
+ putLogError(300051, formatter.str(), __FILE__, __LINE__);
status = FINALIZE;
}
"handle_realserver_send(const boost::thread::id thread_id) : "
"return_value = %d, end_flag = %d. thread id : %d.");
formatter % status % (threaddata.get() ? threaddata->end_flag : END_FLAG_ON) % boost::this_thread::get_id();
- putLogDebug(300083, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300082, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"boost::asio::ip::tcp::endpoint& sorry_endpoint) : "
"thread id : %d, sorry_endpoint : [%s]:%d.");
formatter % boost::this_thread::get_id() % sorry_endpoint.address().to_string() % sorry_endpoint.port();
- putLogDebug(300084, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300083, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
{
boost::format formatter("Invalid thread id. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300050, formatter.str(), __FILE__, __LINE__ );
+ putLogError(300052, formatter.str(), __FILE__, __LINE__ );
throw -1;
}
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_sorryserver_select() : catch exception e = %d. thread id : %d.");
formatter % e % boost::this_thread::get_id();
- putLogDebug(300085, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(300084, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
status = FINALIZE;
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_sorryserver_select() : exception : error = %s. thread id : %d.");
formatter % ex.what() % boost::this_thread::get_id();
- putLogError(300051, formatter.str(), __FILE__, __LINE__ );
+ putLogError(300053, formatter.str(), __FILE__, __LINE__ );
status = FINALIZE;
}
catch (...)
"protocol_module_sslid::handle_sorryserver_select() : "
"Unknown exception. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300052, formatter.str(), __FILE__, __LINE__ );
+ putLogError(300054, formatter.str(), __FILE__, __LINE__ );
status = FINALIZE;
}
"sorry_endpoint : [%s]:%d, return_value = %d.");
formatter % boost::this_thread::get_id()
% sorry_endpoint.address().to_string() % sorry_endpoint.port() % status;
- putLogDebug(300086, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(300085, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
"boost::array<char,MAX_BUFFER_SIZE>& sendbuffer, size_t& datalen) : "
"thread_id = %d.");
formatter % thread_id;
- putLogDebug(300087, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300086, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
{
boost::format formatter("Invalid thread id. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300053, formatter.str(), __FILE__, __LINE__);
+ putLogError(300055, formatter.str(), __FILE__, __LINE__);
status = FINALIZE;
}
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_sorryserver_connect() exception : error = %s. thread id : %d.");
formatter % e.what() % boost::this_thread::get_id();
- putLogError(300054, formatter.str(), __FILE__, __LINE__);
+ putLogError(300056, formatter.str(), __FILE__, __LINE__);
status = FINALIZE;
}
catch (...)
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_sorryserver_connect() : Unknown exception. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300055, formatter.str(), __FILE__, __LINE__);
+ putLogError(300057, formatter.str(), __FILE__, __LINE__);
status = FINALIZE;
}
"boost::array<char,MAX_BUFFER_SIZE>& sendbuffer, size_t& datalen) : "
"return_value = %d. thread id : %d.");
formatter % status % boost::this_thread::get_id();
- putLogDebug(300088, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300087, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"const boost::asio::ip::tcp::endpoint& sorry_endpoint) : "
"thread_id = %d, sorry_endpoint = [%s]:%d.");
formatter % thread_id % sorry_endpoint.address().to_string() % sorry_endpoint.port();
- putLogDebug(300089, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300088, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
{
boost::format formatter("Invalid thread id. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300056, formatter.str(), __FILE__, __LINE__);
+ putLogError(300058, formatter.str(), __FILE__, __LINE__);
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
"const boost::asio::ip::tcp::endpoint& sorry_endpoint) : return_value = %d. "
"thread id : %d.");
formatter % FINALIZE % boost::this_thread::get_id();
- putLogDebug(300090, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300089, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
return FINALIZE;
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_sorryserver_connection_fail() : END_FLAG_ON. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(300091, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300090, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_sorryserver_connection_fail() : exception : error = %s. thread id : %d.");
formatter % e.what() % boost::this_thread::get_id();
- putLogError(300057, formatter.str(), __FILE__, __LINE__);
+ putLogError(300059, formatter.str(), __FILE__, __LINE__);
status = FINALIZE;
}
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_sorryserver_connection_fail() : Unknown exception. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300058, formatter.str(), __FILE__, __LINE__);
+ putLogError(300060, formatter.str(), __FILE__, __LINE__);
status = FINALIZE;
}
"const boost::asio::ip::tcp::endpoint& sorry_endpoint) : "
"return_value = %d, end_flag = %d. thread id : %d.");
formatter % status % (threaddata.get() ? threaddata->end_flag : END_FLAG_ON) % boost::this_thread::get_id();
- putLogDebug(300092, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300091, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
boost::format formatter("in_function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_sorryserver_send(const boost::thread::id thread_id) : thread_id = %d.");
formatter % thread_id;
- putLogDebug(300093, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300092, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
{
boost::format formatter("Invalid thread id. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300059, formatter.str(), __FILE__, __LINE__);
+ putLogError(300061, formatter.str(), __FILE__, __LINE__);
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
"handle_sorryserver_send(const boost::thread::id thread_id) : "
"return_value = %d. thread id : %d.");
formatter % FINALIZE % boost::this_thread::get_id();
- putLogDebug(300094, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300093, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_sorryserver_send() : check_ssl_record_sendable() end. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(300095, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300094, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
if (ret == -1)
{
+ putLogError(300062, "record data is null.", __FILE__, __LINE__);
+
// anomaly, set the end_flag ON
threaddata->end_flag = END_FLAG_ON;
status = FINALIZE;
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_sorryserver_send() : END_FLAG_ON. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(300096, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300095, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
}
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_sorryserver_send() : exception : error = %s. thread id : %d.");
formatter % e.what() % boost::this_thread::get_id();
- putLogError(300060, formatter.str(), __FILE__, __LINE__);
+ putLogError(300063, formatter.str(), __FILE__, __LINE__);
status = FINALIZE;
}
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_sorryserver_send() : Unknown exception. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300061, formatter.str(), __FILE__, __LINE__);
+ putLogError(300064, formatter.str(), __FILE__, __LINE__);
status = FINALIZE;
}
"handle_sorryserver_send(const boost::thread::id thread_id) : "
"return_value = %d, end_flag = %d. thread id : %d.");
formatter % status % (threaddata.get() ? threaddata->end_flag : END_FLAG_ON) % boost::this_thread::get_id();
- putLogDebug(300097, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300096, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"recvbuffer = %s, recvlen = %d.");
formatter % thread_id % rs_endpoint.address().to_string() % rs_endpoint.port() %
buffer % recvlen;
- putLogDebug(300098, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300097, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
std::cerr << "protocol_module_sslid::handle_realserver_recv() : Data size bigger than buffer size." << std::endl;
boost::format formatter("Data size bigger than buffer size. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300062, formatter.str(), __FILE__, __LINE__);
+ putLogError(300065, formatter.str(), __FILE__, __LINE__);
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
"const boost::array<char,MAX_BUFFER_SIZE>& recvbuffer, "
"const size_t recvlen) : return_value = %d. thread id : %d.");
formatter % FINALIZE % boost::this_thread::get_id();
- putLogDebug(300099, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300098, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
{
boost::format formatter("Invalid thread id. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300063, formatter.str(), __FILE__, __LINE__);
+ putLogError(300066, formatter.str(), __FILE__, __LINE__);
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
"const boost::array<char,MAX_BUFFER_SIZE>& recvbuffer, "
"const size_t recvlen) : return_value = %d. thread id : %d.");
formatter % FINALIZE % boost::this_thread::get_id();
- putLogDebug(300100, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300099, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
std::cerr << "protocol_module_sslid::handle_realserver_recv() : Data size bigger than buffer size." << std::endl;
boost::format formatter("Data size bigger than buffer size. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300064, formatter.str(), __FILE__, __LINE__);
+ putLogError(300067, formatter.str(), __FILE__, __LINE__);
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
"const boost::array<char,MAX_BUFFER_SIZE>& recvbuffer, "
"const size_t recvlen) : return_value = %d. thread id : %d.");
formatter % FINALIZE % boost::this_thread::get_id();
- putLogDebug(300101, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300100, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"handle_realserver_recv() : before memmove (data dump) : "
"data begin = %d, data_size = %d, data = %s");
formatter % threaddata->data_begain_offset % threaddata->data_size % datadump;
- putLogDebug(300102, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300101, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"handle_realserver_recv() : after memmove (data dump) : "
"data begin = 0, data_size = %d, data = %s");
formatter % threaddata->data_size % datadump;
- putLogDebug(300103, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300102, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
}
"handle_realserver_recv() : before memcpy (data dump) : "
"data begin = 0, data_size = %d, data = %s");
formatter % recvlen % datadump;
- putLogDebug(300104, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300103, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"handle_realserver_recv() : after memcpy (data dump) : "
"data begin = 0, data_size = %d, data = %s");
formatter % recvlen % datadump;
- putLogDebug(300105, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300104, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_realserver_recv() : check_ssl_record_sendable() end. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(300106, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300105, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
if (ret == -1)
{
+ putLogError(300068, "record data is null.", __FILE__, __LINE__);
+
// anomaly, set the end_flag ON
threaddata->end_flag = END_FLAG_ON;
status = FINALIZE;
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_realserver_recv() : END_FLAG_ON. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(300107, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300106, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
}
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_realserver_recv() : exception : error = %s. thread id : %d.");
formatter % e.what() % boost::this_thread::get_id();
- putLogError(300065, formatter.str(), __FILE__, __LINE__);
+ putLogError(300069, formatter.str(), __FILE__, __LINE__);
status = FINALIZE;
}
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_realserver_recv() : Unknown exception. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300066, formatter.str(), __FILE__, __LINE__);
+ putLogError(300070, formatter.str(), __FILE__, __LINE__);
status = FINALIZE;
}
"const boost::array<char,MAX_BUFFER_SIZE>& recvbuffer, "
"const size_t recvlen) : return_value = %d, end_flag = %d. thread id : %d.");
formatter % status % (threaddata.get() ? threaddata->end_flag : END_FLAG_ON) % boost::this_thread::get_id();
- putLogDebug(300108, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300107, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"const boost::array<char,MAX_BUFFER_SIZE>& recvbuffer, "
"const size_t recvlen) : return_value = %d. thread id : %d.");
formatter % STOP % boost::this_thread::get_id();
- putLogDebug(300109, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300108, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"recvbuffer = %s, recvlen = %d.");
formatter % thread_id % sorry_endpoint.address().to_string() % sorry_endpoint.port() %
buffer % recvlen;
- putLogDebug(300110, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300109, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
std::cerr << "protocol_module_sslid::handle_sorryserver_recv() : Data size bigger than buffer size." << std::endl;
boost::format formatter("Data size bigger than buffer size. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300067, formatter.str(), __FILE__, __LINE__);
+ putLogError(300071, formatter.str(), __FILE__, __LINE__);
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
"const boost::array<char,MAX_BUFFER_SIZE>& recvbuffer, "
"const size_t recvlen) : return_value = %d. thread id : %d.");
formatter % FINALIZE % boost::this_thread::get_id();
- putLogDebug(300111, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300110, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
{
boost::format formatter("Invalid thread id. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300068, formatter.str(), __FILE__, __LINE__);
+ putLogError(300072, formatter.str(), __FILE__, __LINE__);
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
"const boost::array<char,MAX_BUFFER_SIZE>& recvbuffer, "
"const size_t recvlen) : return_value = %d. thread id : %d.");
formatter % FINALIZE % boost::this_thread::get_id();
- putLogDebug(300112, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300111, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
std::cerr << "protocol_module_sslid::handle_sorryserver_recv() : Data size bigger than buffer size." << std::endl;
boost::format formatter("Data size bigger than buffer size. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300069, formatter.str(), __FILE__, __LINE__);
+ putLogError(300073, formatter.str(), __FILE__, __LINE__);
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
"const boost::array<char,MAX_BUFFER_SIZE>& recvbuffer, "
"const size_t recvlen) : return_value = %d. thread id : %d.");
formatter % FINALIZE % boost::this_thread::get_id();
- putLogDebug(300113, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300112, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"handle_sorryserver_recv() : before memmove (data dump) : "
"data begin = %d, data_size = %d, data = %s");
formatter % threaddata->data_begain_offset % threaddata->data_size % datadump;
- putLogDebug(300114, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300113, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"handle_sorryserver_recv() : after memmove (data dump) : "
"data begin = 0, data_size = %d, data = %s");
formatter % threaddata->data_size % datadump;
- putLogDebug(300115, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300114, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
}
"handle_sorryserver_recv() : before memcpy (data dump) : "
"data begin = 0, data_size = %d, data = %s");
formatter % recvlen % datadump;
- putLogDebug(300116, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300115, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"handle_sorryserver_recv() : after memcpy (data dump) : "
"data begin = 0, data_size = %d, data = %s");
formatter % recvlen % datadump;
- putLogDebug(300117, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300116, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_sorryserver_recv() : check_ssl_record_sendable() end. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(300118, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300117, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
if (ret == -1)
{
+ putLogError(300074, "record data is null.", __FILE__, __LINE__);
+
// anomaly, set the end_flag ON
threaddata->end_flag = END_FLAG_ON;
status = FINALIZE;
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_sorryserver_recv() : END_FLAG_ON. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(300119, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300118, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
}
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_sorryserver_recv() : exception : error = %s. thread id : %d.");
formatter % e.what() % boost::this_thread::get_id();
- putLogError(300070, formatter.str(), __FILE__, __LINE__);
+ putLogError(300075, formatter.str(), __FILE__, __LINE__);
status = FINALIZE;
}
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_sorryserver_recv() : Unknown exception. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300071, formatter.str(), __FILE__, __LINE__);
+ putLogError(300076, formatter.str(), __FILE__, __LINE__);
status = FINALIZE;
}
"const boost::array<char,MAX_BUFFER_SIZE>& recvbuffer, "
"const size_t recvlen) : return_value = %d, end_flag = %d. thread id : %d.");
formatter % status % (threaddata.get() ? threaddata->end_flag : END_FLAG_ON) % boost::this_thread::get_id();
- putLogDebug(300120, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300119, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"handle_response_send_inform(const boost::thread::id thread_id) : return_value = %d. "
"thread id : %d.");
formatter % STOP % boost::this_thread::get_id();
- putLogDebug(300121, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300120, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"boost::array<char,MAX_BUFFER_SIZE>& sendbuffer, "
"size_t& datalen) : thread_id = %d.");
formatter % thread_id;
- putLogDebug(300122, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300121, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
{
boost::format formatter("Invalid thread id. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300072, formatter.str(), __FILE__, __LINE__);
+ putLogError(300077, formatter.str(), __FILE__, __LINE__);
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
"boost::array<char,MAX_BUFFER_SIZE>& sendbuffer, "
"size_t& datalen) : return_value = %d. thread id : %d.");
formatter % FINALIZE % boost::this_thread::get_id();
- putLogDebug(300123, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300122, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"boost::array<char,MAX_BUFFER_SIZE>& sendbuffer, "
"size_t& datalen) : return_value = %d. thread id : %d.");
formatter % FINALIZE % boost::this_thread::get_id();
- putLogDebug(300124, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300123, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
-
- threaddata->end_flag = END_FLAG_ON;
- return FINALIZE;
}
/*-------- DEBUG LOG --------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_client_connection_check() : get_ssl_session_id() end. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(300125, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300124, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"handle_client_connection_check() : write_session_data() end."
"session_id = %s. thread id : %d.");
formatter % buffer % boost::this_thread::get_id();
- putLogDebug(300126, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300125, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
}
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_client_connection_check() : put_data_to_sendbuffer() end. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(300127, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300126, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_client_connection_check() : exception : error = %s. thread id : %d.");
formatter % e.what() % boost::this_thread::get_id();
- putLogError(300073, formatter.str(), __FILE__, __LINE__);
+ putLogError(300078, formatter.str(), __FILE__, __LINE__);
status = FINALIZE;
}
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_client_connection_check() : Unknown exception. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300074, formatter.str(), __FILE__, __LINE__);
+ putLogError(300079, formatter.str(), __FILE__, __LINE__);
status = FINALIZE;
}
"boost::array<char,MAX_BUFFER_SIZE>& sendbuffer, size_t& datalen) : "
"return_value = %d. thread id : %d.");
formatter % status % boost::this_thread::get_id();
- putLogDebug(300128, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300127, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"boost::array<char,MAX_BUFFER_SIZE>& sendbuffer, "
"size_t& datalen) : return_value = %d. thread id : %d.");
formatter % STOP % boost::this_thread::get_id();
- putLogDebug(300129, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300128, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
boost::format formatter("in_function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_client_send(const boost::thread::id thread_id) : thread_id = %d.");
formatter % thread_id;
- putLogDebug(300130, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300129, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
{
boost::format formatter("Invalid thread id. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300075, formatter.str(), __FILE__, __LINE__);
+ putLogError(300080, formatter.str(), __FILE__, __LINE__);
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
boost::format formatter("out_function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_client_send(const boost::thread::id thread_id) : return_value = %d. thread id : %d.");
formatter % FINALIZE % boost::this_thread::get_id();
- putLogDebug(300131, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300130, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_client_send() : data_size = %d, end_flag = %d. thread id : %d.");
formatter % threaddata->data_size % threaddata->end_flag % boost::this_thread::get_id();
- putLogDebug(300132, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300131, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_client_send() : data_size = %d, current_record_rest_size = %d. thread id : %d.");
formatter % threaddata->data_size % threaddata->current_record_rest_size % boost::this_thread::get_id();
- putLogDebug(300133, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300132, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"handle_client_send() : check_ssl_record_sendable() end. "
"return_value = %d. thread id : %d.");
formatter % ret % boost::this_thread::get_id();
- putLogDebug(300134, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300133, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
if (ret == -1)
{
+ putLogError(300081, "record data is null.", __FILE__, __LINE__);
+
// anomaly, set the end_flag ON
threaddata->end_flag = END_FLAG_ON;
/*-------- DEBUG LOG --------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_client_send() : END_FLAG_ON. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(300135, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300134, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_client_send() : exception : error = %s. thread id : %d.");
formatter % e.what() % boost::this_thread::get_id();
- putLogError(300076, formatter.str(), __FILE__, __LINE__);
+ putLogError(300082, formatter.str(), __FILE__, __LINE__);
status = FINALIZE;
}
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_client_send() : Unknown exception. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300077, formatter.str(), __FILE__, __LINE__);
+ putLogError(300083, formatter.str(), __FILE__, __LINE__);
status = FINALIZE;
}
"handle_client_send(const boost::thread::id thread_id) : "
"return_value = %d, end_flag = %d. thread id : %d.");
formatter % status % (threaddata.get() ? threaddata->end_flag : END_FLAG_ON) % boost::this_thread::get_id();
- putLogDebug(300136, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300135, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"handle_client_disconnect(const boost::thread::id thread_id) : "
"thread_id = %d.");
formatter % thread_id;
- putLogDebug(300137, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300136, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
{
boost::format formatter("Invalid thread id. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300078, formatter.str(), __FILE__, __LINE__ );
+ putLogError(300084, formatter.str(), __FILE__, __LINE__ );
throw -1;
}
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_client_disconnect() : catch exception e = %d. thread id : %d.");
formatter % e % boost::this_thread::get_id();
- putLogDebug(300138, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(300137, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
}
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_client_disconnect() : exception : error = %s. thread id : %d.");
formatter % ex.what() % boost::this_thread::get_id();
- putLogError(300079, formatter.str(), __FILE__, __LINE__ );
+ putLogError(300085, formatter.str(), __FILE__, __LINE__ );
}
catch (...)
{
"protocol_module_sslid::handle_client_disconnect() : "
"Unknown exception. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300080, formatter.str(), __FILE__, __LINE__ );
+ putLogError(300086, formatter.str(), __FILE__, __LINE__ );
}
/*-------- DEBUG LOG --------*/
"handle_client_disconnect(const boost::thread::id thread_id) : "
"thread_id = %d, return_value = %d.");
formatter % thread_id % FINALIZE;
- putLogDebug(300139, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300138, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
boost::format formatter("in_function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_sorry_enable(const boost::thread::id thread_id) : thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(300140, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300139, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
{
boost::format formatter("Invalid thread id. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300081, formatter.str(), __FILE__, __LINE__ );
+ putLogError(300087, formatter.str(), __FILE__, __LINE__ );
throw -1;
}
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_sorry_enable(const boost::thread::id thread_id) : END_FLAG_ON. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(300141, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(300140, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_sorry_enable(const boost::thread::id thread_id) : SORRY_FLAG_ON. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(300142, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(300141, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_sorry_enable() : catch exception e = %d. thread id : %d.");
formatter % e % boost::this_thread::get_id();
- putLogDebug(300143, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(300142, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
-
+
// set return status
status = FINALIZE;
}
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_sorry_enable() : exception : error = %s. thread id : %d.");
formatter % ex.what() % boost::this_thread::get_id();
- putLogError(300082, formatter.str(), __FILE__, __LINE__ );
+ putLogError(300088, formatter.str(), __FILE__, __LINE__ );
// set return status
status = FINALIZE;
"protocol_module_sslid::handle_sorry_enable() : "
"Unknown exception. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300083, formatter.str(), __FILE__, __LINE__ );
+ putLogError(300089, formatter.str(), __FILE__, __LINE__ );
// set return status
status = FINALIZE;
"handle_sorry_enable(const boost::thread::id thread_id) : "
"thread_id = %d, return_value = %d.");
formatter % thread_id % status;
- putLogDebug(300144, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300143, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
boost::format formatter("in/out_function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_sorry_disable(const boost::thread::id thread_id) : thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(300145, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300144, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
{
boost::format formatter("Invalid thread id. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300084, formatter.str(), __FILE__, __LINE__ );
+ putLogError(300090, formatter.str(), __FILE__, __LINE__ );
throw -1;
}
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_sorry_disable(const boost::thread::id thread_id) : END_FLAG_ON. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(300146, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(300145, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_sorry_disable(const boost::thread::id thread_id) : SORRY_FLAG_OFF. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(300147, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(300146, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_sorry_disable() : catch exception e = %d. thread id : %d.");
formatter % e % boost::this_thread::get_id();
- putLogDebug(300148, formatter.str(), __FILE__, __LINE__ );
+ putLogDebug(300147, formatter.str(), __FILE__, __LINE__ );
}
/*------DEBUG LOG END------*/
boost::format formatter("function : protocol_module_base::EVENT_TAG protocol_module_sslid::"
"handle_sorry_disable() : exception : error = %s. thread id : %d.");
formatter % ex.what() % boost::this_thread::get_id();
- putLogError(300085, formatter.str(), __FILE__, __LINE__ );
+ putLogError(300091, formatter.str(), __FILE__, __LINE__ );
// set return status
status = FINALIZE;
"protocol_module_sslid::handle_sorry_disable() : "
"Unknown exception. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300086, formatter.str(), __FILE__, __LINE__ );
+ putLogError(300092, formatter.str(), __FILE__, __LINE__ );
// set return status
status = FINALIZE;
"handle_sorry_disable(const boost::thread::id thread_id) : "
"thread_id = %d, return_value = %d.");
formatter % thread_id % status;
- putLogDebug(300149, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300148, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"handle_realserver_disconnect(const boost::thread::id thread_id, "
"const boost::asio::ip::tcp::endpoint& rs_endpoint) : return_value = %d. thread id : %d.");
formatter % STOP % boost::this_thread::get_id();
- putLogDebug(300150, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300149, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"handle_sorryserver_disconnect(const boost::thread::id thread_id, "
"const boost::asio::ip::tcp::endpoint& sorry_endpoint) : return_value = %d. thread id : %d.");
formatter % STOP % boost::this_thread::get_id();
- putLogDebug(300151, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300150, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"handle_realserver_close(const boost::thread::id thread_id, "
"const boost::asio::ip::udp::endpoint& rs_endpoint) : return_value = %d. thread id : %d.");
formatter % STOP % boost::this_thread::get_id();
- putLogDebug(300152, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300151, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300153, "in_function : void protocol_module_sslid::replication_interrupt().", __FILE__, __LINE__);
+ putLogDebug(300152, "in_function : void protocol_module_sslid::replication_interrupt().", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
if (replication_data_processor)
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300154, "function : void protocol_module_sslid::replication_interrupt() : "
+ putLogDebug(300153, "function : void protocol_module_sslid::replication_interrupt() : "
"write_replication_area() end.", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300155, "out_function : void protocol_module_sslid::replication_interrupt().", __FILE__, __LINE__);
+ putLogDebug(300154, "out_function : void protocol_module_sslid::replication_interrupt().", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
}
"boost::array<char,MAX_BUFFER_SIZE>& sendbuffer, "
"size_t& datalen) : thread_id = %d.");
formatter % thread_id;
- putLogDebug(300156, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300155, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
{
boost::format formatter("Invalid thread id. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogError(300087, formatter.str(), __FILE__, __LINE__);
+ putLogError(300093, formatter.str(), __FILE__, __LINE__);
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
"boost::array<char,MAX_BUFFER_SIZE>& sendbuffer, "
"size_t& datalen) : return_value = -1. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(300157, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300156, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
boost::format formatter("function : int protocol_module_sslid::put_data_to_sendbuffer() "
": current_record_rest_size >= data_size. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(300158, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300157, formatter.str(), __FILE__, __LINE__);
}
// remain data size greater than all data size
"dump data_size = %d, dump data = %s");
formatter % threaddata->data_begain_offset % threaddata->current_record_rest_size
% threaddata->data_size % datadump;
- putLogDebug(300159, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300158, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"dump data_size = %d, dump data = %s");
formatter % threaddata->data_begain_offset % threaddata->current_record_rest_size
% datalen % datadump;
- putLogDebug(300160, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300159, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
}
"dump data_size = %d, dump data = %s");
formatter % threaddata->data_begain_offset % threaddata->current_record_rest_size
% sendbufsize % datadump;
- putLogDebug(300161, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300160, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"dump data_size = %d, dump data = %s");
formatter % threaddata->data_begain_offset % threaddata->current_record_rest_size
% datalen % datadump;
- putLogDebug(300162, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300161, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
}
boost::format formatter("function : int protocol_module_sslid::put_data_to_sendbuffer() "
": current_record_rest_size < data_size. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(300163, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300162, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"dump data_size = %d, dump data = %s");
formatter % threaddata->data_begain_offset % threaddata->current_record_rest_size
% threaddata->current_record_rest_size % datadump;
- putLogDebug(300164, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300163, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"dump data_size = %d, dump data = %s");
formatter % threaddata->data_begain_offset % threaddata->current_record_rest_size
% datalen % datadump;
- putLogDebug(300165, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300164, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
}
"dump data_size = %d, dump data = %s");
formatter % threaddata->data_begain_offset % threaddata->current_record_rest_size
% sendbufsize % datadump;
- putLogDebug(300166, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300165, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"dump data_size = %d, dump data = %s");
formatter % threaddata->data_begain_offset % threaddata->current_record_rest_size
% datalen % datadump;
- putLogDebug(300167, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300166, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
}
"boost::array<char,MAX_BUFFER_SIZE>& sendbuffer, "
"size_t& datalen) : return_value = 0. thread id : %d.");
formatter % boost::this_thread::get_id();
- putLogDebug(300168, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300167, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
boost::format formatter("in_function : bool protocol_module_sslid::realserver_selected("
"const boost::asio::ip::tcp::endpoint& rs_endpoint) : rs_endpoint = [%s]:%d.");
formatter % rs_endpoint.address().to_string() % rs_endpoint.port();
- putLogDebug(300169, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300168, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300170, "out_function : bool protocol_module_sslid::realserver_selected("
+ putLogDebug(300169, "out_function : bool protocol_module_sslid::realserver_selected("
"const boost::asio::ip::tcp::endpoint& rs_endpoint) : return_value = false."
, __FILE__, __LINE__);
}
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300171, "out_function : bool protocol_module_sslid::realserver_selected("
+ putLogDebug(300170, "out_function : bool protocol_module_sslid::realserver_selected("
"const boost::asio::ip::tcp::endpoint& rs_endpoint) : return_value = true."
, __FILE__, __LINE__);
}
else
{
//data error
- return -1;
+ all_length = recv_length;
+ return 0;
}
}
else
}
else
{
- //is not ssl record
- return -1;
+ //is not sslv3 record
+ all_length = recv_length;
+ return 0;
}
}
else
formatter % maxlist % static_cast<void*>(sslid_replication_area_begain)
% sslid_replication_area_size % virtual_service_endpoint.address().to_string()
% virtual_service_endpoint.port();
- putLogDebug(300197, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300196, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300198, "out_function : Constructor sslid_replication_data_processor::"
+ putLogDebug(300197, "out_function : Constructor sslid_replication_data_processor::"
"sslid_replication_data_processor(int maxlist, "
"char* sslid_replication_area_begain, int sslid_replication_area_size, "
"const boost::asio::ip::tcp::endpoint& virtual_service_endpoint, "
if (unlikely(sslid_replication_area_begain == NULL))
{
// replication area is null
- putLogError(300092, "Replication area is null.", __FILE__, __LINE__);
+ putLogError(300098, "Replication area is null.", __FILE__, __LINE__);
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300199, "function : sslid_replication_data_processor::"
+ putLogDebug(300198, "function : sslid_replication_data_processor::"
"sslid_replication_data_processor() : Replication area is null.", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
sizeof(sslid_replication_data_header) * SSLID_SERVICE_NUMBER + used)
{
// no enough replication area
- putLogError(300093, "Over replication area.", __FILE__, __LINE__);
+ putLogError(300099, "Over replication area.", __FILE__, __LINE__);
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300200, "function : sslid_replication_data_processor::"
+ putLogDebug(300199, "function : sslid_replication_data_processor::"
"sslid_replication_data_processor() : Over replication area.",
__FILE__, __LINE__);
- putLogDebug(300201, "out_function : Constructor sslid_replication_data_processor::"
+ putLogDebug(300200, "out_function : Constructor sslid_replication_data_processor::"
"sslid_replication_data_processor(int maxlist, "
"char* sslid_replication_area_begain, int sslid_replication_area_size, "
"const boost::asio::ip::tcp::endpoint& virtual_service_endpoint, "
static_cast<size_t>(sslid_replication_area_size) * DATA_SIZE)
{
// replication area is full
- putLogError(300094, "Replication area is full.", __FILE__, __LINE__);
+ putLogError(300100, "Replication area is full.", __FILE__, __LINE__);
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300202, "function : sslid_replication_data_processor::"
+ putLogDebug(300201, "function : sslid_replication_data_processor::"
"sslid_replication_data_processor() : Replication area is full.",
__FILE__, __LINE__);
}
"sslid_replication_data_processor() : before memcpy (data dump) : "
"data begin = %d, data_size = %d, data = %s");
formatter % head->offset % head->size % datadump;
- putLogDebug(300203, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300202, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
memcpy(replication_area, sslid_replication_area_begain + head->offset, head->size);
"sslid_replication_data_processor() : after memcpy (data dump) : "
"data begin = 0, data_size = %d, data = %s");
formatter % head->size % datadump;
- putLogDebug(300204, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300203, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
memset(sslid_replication_area_begain + head->offset, 0, head->size);
"size = %d, offset = %d).");
formatter % pick->virtualserver_ip % pick->virtualserver_port
% pick->size % pick->offset;
- putLogDebug(300205, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300204, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
}
else
{
// replication area is full
- putLogError(300095, "Replication area is full.", __FILE__, __LINE__);
+ putLogError(300101, "Replication area is full.", __FILE__, __LINE__);
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300206, "function : sslid_replication_data_processor::"
+ putLogDebug(300205, "function : sslid_replication_data_processor::"
"sslid_replication_data_processor() : Replication area is full.",
__FILE__, __LINE__);
}
"size = %d, offset = %d).");
formatter % pick->virtualserver_ip % pick->virtualserver_port
% pick->size % pick->offset;
- putLogDebug(300207, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300206, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
replication_area = reinterpret_cast<sslid_replication_data*>(sslid_replication_area_begain +
static_cast<size_t>(sslid_replication_area_size) * DATA_SIZE)
{
// replication area is full
- putLogError(300096, "Replication area is full.", __FILE__, __LINE__);
+ putLogError(300102, "Replication area is full.", __FILE__, __LINE__);
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300208, "function : sslid_replication_data_processor::"
+ putLogDebug(300207, "function : sslid_replication_data_processor::"
"sslid_replication_data_processor() : Replication area is full.",
__FILE__, __LINE__);
}
"size = %d, offset = %d).");
formatter % pick->virtualserver_ip % pick->virtualserver_port
% pick->size % pick->offset;
- putLogDebug(300209, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300208, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
}
else
{
// replication area is full
- putLogError(300097, "Replication area is full.", __FILE__, __LINE__);
+ putLogError(300103, "Replication area is full.", __FILE__, __LINE__);
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300210, "function : sslid_replication_data_processor::"
+ putLogDebug(300209, "function : sslid_replication_data_processor::"
"sslid_replication_data_processor() : Replication area is full.",
__FILE__, __LINE__);
}
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300211, "out_function : Constructor sslid_replication_data_processor::"
+ putLogDebug(300210, "out_function : Constructor sslid_replication_data_processor::"
"sslid_replication_data_processor(int maxlist, "
"char* sslid_replication_area_begain, int sslid_replication_area_size, "
"const boost::asio::ip::tcp::endpoint& virtual_service_endpoint, "
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300212, "in/out_function : Destructor sslid_replication_data_processor::"
+ putLogDebug(300211, "in/out_function : Destructor sslid_replication_data_processor::"
"~sslid_replication_data_processor().", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"data.session_id = %s, data.last_time = %lu, data.endpoint = [%s]:%d.");
formatter % data.op_code % buffer % data.last_time % data.realserver_addr.address().to_string()
% data.realserver_addr.port();
- putLogDebug(300213, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300212, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300214, "out_function : void sslid_replication_data_processor::"
+ putLogDebug(300213, "out_function : void sslid_replication_data_processor::"
"put_into_temp_list(const sslid_replication_temp_data& data).", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300215, "in_function : void sslid_replication_data_processor::"
+ putLogDebug(300214, "in_function : void sslid_replication_data_processor::"
"write_replicaion_area().", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300216, "out_function : void sslid_replication_data_processor::"
+ putLogDebug(300215, "out_function : void sslid_replication_data_processor::"
"write_replicaion_area().", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
boost::format formatter("function : void sslid_replication_data_processor::"
"write_replicaion_area() : 'A' : session_id = %s.");
formatter % buffer;
- putLogDebug(300217, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300216, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"write_replicaion_area() : 'A' : realserver_ip = %s, "
"realserver_prot = %d.");
formatter % replication_area[i].realserver_ip % replication_area[i].realserver_port;
- putLogDebug(300218, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300217, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"write_replicaion_area() : 'U' : last_time(before) = %lu, "
"last_time(after) = %lu.");
formatter % replication_area[i].last_time % temp_data.last_time;
- putLogDebug(300219, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300218, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"write_replicaion_area() : 'D' : data valid(before) = %d, "
"data valid(after) = %d.");
formatter % replication_area[i].valid % 0;
- putLogDebug(300220, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300219, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
boost::format formatter("function : void sslid_replication_data_processor::write_replicaion_area() : "
"exception : error = %s.");
formatter % e.what();
- putLogError(300098, formatter.str(), __FILE__, __LINE__);
+ putLogError(300104, formatter.str(), __FILE__, __LINE__);
}
catch (boost::thread_interrupted&)
{
replication_area_unlock();
}
std::cerr << "sslid_replication_data_processor::write_replicaion_area() : exception." << std::endl;
- putLogError(300099, "function : void sslid_replication_data_processor::write_replicaion_area() : "
+ putLogError(300105, "function : void sslid_replication_data_processor::write_replicaion_area() : "
"Thread_interrupted exception.", __FILE__, __LINE__);
}
catch (...)
replication_area_unlock();
}
std::cerr << "sslid_replication_data_processor::write_replicaion_area() : Unknown exception." << std::endl;
- putLogError(300100, "function : void sslid_replication_data_processor::write_replicaion_area() : "
+ putLogError(300106, "function : void sslid_replication_data_processor::write_replicaion_area() : "
"Unknown exception.", __FILE__, __LINE__);
}
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300221, "out_function : void sslid_replication_data_processor::"
+ putLogDebug(300220, "out_function : void sslid_replication_data_processor::"
"write_replicaion_area().", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"sslid_replication_data_processor::"
"get_replication_area() : return_value = &(%d).");
formatter % static_cast<void*>(replication_area);
- putLogDebug(300222, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300221, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300223, "in_function : void sslid_replication_data_processor::"
+ putLogDebug(300222, "in_function : void sslid_replication_data_processor::"
"register_replication_area_lock(boost::function<void(void)> intable_lock).",
__FILE__, __LINE__);
}
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300224, "out_function : void sslid_replication_data_processor::"
+ putLogDebug(300223, "out_function : void sslid_replication_data_processor::"
"register_replication_area_lock(boost::function<void(void)> intable_lock).",
__FILE__, __LINE__);
}
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300225, "in_function : void sslid_replication_data_processor::"
+ putLogDebug(300224, "in_function : void sslid_replication_data_processor::"
"register_replication_area_unlock(boost::function<void(void)> intable_unlock).",
__FILE__, __LINE__);
}
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300226, "out_function : void sslid_replication_data_processor::"
+ putLogDebug(300225, "out_function : void sslid_replication_data_processor::"
"register_replication_area_unlock(boost::function<void(void)> intable_unlock).",
__FILE__, __LINE__);
}
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300227, "in_function : void sslid_replication_data_processor::"
+ putLogDebug(300226, "in_function : void sslid_replication_data_processor::"
"get_from_temp_list(sslid_replication_temp_data& data).", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"data.last_time = %lu, data.endpoint = [%s]:%d.");
formatter % ret % data.op_code % buffer % data.last_time %
data.realserver_addr.address().to_string() % data.realserver_addr.port();
- putLogDebug(300228, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300227, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"logger_func_type inputLogInfo, logger_func_type inputLogDebug) : "
"maxlist = %d, timeout = %d, replication_data_processor = &(%d).");
formatter % maxlist % timeout % static_cast<void*>(replication_data_processor);
- putLogDebug(300172, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300171, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300173, "out_function : Constructor sslid_session_data_processor::"
+ putLogDebug(300172, "out_function : Constructor sslid_session_data_processor::"
"sslid_session_data_processor(int maxlist, int timeout, "
"sslid_replication_data_processor* replication_data_processor, "
"getloglevel_func_type ingetloglevel, logger_func_type inputLogFatal, "
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300174, "out_function : Constructor sslid_session_data_processor::"
+ putLogDebug(300173, "out_function : Constructor sslid_session_data_processor::"
"sslid_session_data_processor(int maxlist, int timeout, "
"sslid_replication_data_processor* replication_data_processor, "
"getloglevel_func_type ingetloglevel, logger_func_type inputLogFatal, "
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300175, "in/out_function : Destructor sslid_session_data_processor::"
+ putLogDebug(300174, "in/out_function : Destructor sslid_session_data_processor::"
"~sslid_session_data_processor().", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"boost::asio::ip::tcp::endpoint& endpoint) : "
"session_id = %s, endpoint = [%s]:%d.");
formatter % buffer % endpoint.address().to_string() % endpoint.port();
- putLogDebug(300176, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300175, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300177, "out_function : int sslid_session_data_processor::"
+ putLogDebug(300176, "out_function : int sslid_session_data_processor::"
"get_endpoint_from_session_data(const std::string& session_id, "
"boost::asio::ip::tcp::endpoint& endpoint) : return_value = 1.",
__FILE__, __LINE__);
boost::format formatter("function : int sslid_session_data_processor::"
"get_endpoint_from_session_data() : endpoint is exist endpoint = [%s]:%d.");
formatter % endpoint.address().to_string() % endpoint.port();
- putLogDebug(300178, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300177, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
}
boost::format formatter("function : int sslid_session_data_processor::"
"get_endpoint_from_session_data() : exception : error = %s.");
formatter % e.what();
- putLogError(300088, formatter.str(), __FILE__, __LINE__);
+ putLogError(300094, formatter.str(), __FILE__, __LINE__);
ret = -1;
}
"get_endpoint_from_session_data(const std::string& session_id, "
"boost::asio::ip::tcp::endpoint& endpoint) : return_value = %d.");
formatter % ret;
- putLogDebug(300179, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300178, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"time_t now_time) : session_id = %s, "
"endpoint = [%s]:%d, now_time = %lu.");
formatter % buffer % endpoint.address().to_string() % endpoint.port() % now_time;
- putLogDebug(300180, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300179, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300181, "out_function : int sslid_session_data_processor::"
+ putLogDebug(300180, "out_function : int sslid_session_data_processor::"
"write_session_data(const std::string& session_id, "
"const boost::asio::ip::tcp::endpoint& endpoint, time_t now_time) : "
"return_value = 0.", __FILE__, __LINE__);
"write_session_data() : put_into_temp_list() "
"--update item session_id = %s -- end.");
formatter % buffer;
- putLogDebug(300182, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300181, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
}
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300183, "out_function : int sslid_session_data_processor::"
+ putLogDebug(300182, "out_function : int sslid_session_data_processor::"
"write_session_data(const std::string& session_id, "
"const boost::asio::ip::tcp::endpoint& endpoint, time_t now_time) : "
"return_value = 0.", __FILE__, __LINE__);
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300184, "function : int sslid_session_data_processor::"
+ putLogDebug(300183, "function : int sslid_session_data_processor::"
"write_session_data() : clear_expired_session_data() end.",
__FILE__, __LINE__);
}
"write_session_data() : put_into_temp_list() "
"--add item session_id = %s -- end.");
formatter % buffer;
- putLogDebug(300185, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300184, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
}
boost::format formatter("function : int sslid_session_data_processor::"
"write_session_data() : exception : error = %s.");
formatter % e.what();
- putLogError(300089, formatter.str(), __FILE__, __LINE__);
+ putLogError(300095, formatter.str(), __FILE__, __LINE__);
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300186, "out_function : int sslid_session_data_processor::"
+ putLogDebug(300185, "out_function : int sslid_session_data_processor::"
"write_session_data(const std::string& session_id, "
"const boost::asio::ip::tcp::endpoint& endpoint, time_t now_time) : "
"return_value = -1.", __FILE__, __LINE__);
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300187, "out_function : int sslid_session_data_processor::"
+ putLogDebug(300186, "out_function : int sslid_session_data_processor::"
"write_session_data(const std::string& session_id, "
"const boost::asio::ip::tcp::endpoint& endpoint, time_t now_time) : "
"return_value = 0.", __FILE__, __LINE__);
"read_session_data_from_replication_area(sslid_replication_data* replication_area) : "
"replication_area = &(%d).");
formatter % static_cast<void*>(replication_area);
- putLogDebug(300188, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300187, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
// null check
if (unlikely(replication_area == NULL))
{
- putLogError(300090, "Replication area is NULL.", __FILE__, __LINE__);
+ putLogError(300096, "Replication area is NULL.", __FILE__, __LINE__);
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300189, "out_function : int sslid_session_data_processor::"
+ putLogDebug(300188, "out_function : int sslid_session_data_processor::"
"read_session_data_from_replication_area("
"sslid_replication_data* replication_area) : return_value = -1.", __FILE__, __LINE__);
}
"read_session_data_from_replication_area() : "
"data begin = 0, data_size = %d, data = %s");
formatter % maxlist % datadump;
- putLogDebug(300190, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300189, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
for (int i = 0; i < maxlist; ++i)
boost::format formatter("function : int sslid_session_data_processor::"
"read_session_data_from_replication_area() : exception : error = %s.");
formatter % e.what();
- putLogError(300091, formatter.str(), __FILE__, __LINE__);
+ putLogError(300097, formatter.str(), __FILE__, __LINE__);
ret = -1;
}
"read_session_data_from_replication_area(slid_replication_data* replication_area) : "
"return_value = %d.");
formatter % ret;
- putLogDebug(300191, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300190, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300192, "in_function : int sslid_session_data_processor::"
+ putLogDebug(300191, "in_function : int sslid_session_data_processor::"
"clear_expired_session_data().", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
/*-------- DEBUG LOG --------*/
if (unlikely(LOG_LV_DEBUG == getloglevel()))
{
- putLogDebug(300193, "out_function : int sslid_session_data_processor::"
+ putLogDebug(300192, "out_function : int sslid_session_data_processor::"
"clear_expired_session_data() : return_value = 1.", __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"clear_expired_session_data() : "
"--delete oldest time item form the map session_id = %s -- end.");
formatter % buffer;
- putLogDebug(300194, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300193, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
"clear_expired_session_data() : put_into_temp_list() "
"--delete oldest time item session_id = %s -- end.");
formatter % buffer;
- putLogDebug(300195, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300194, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
boost::format formatter("out_function : int sslid_session_data_processor::"
"clear_expired_session_data() : return_value = %d.");
formatter % ret;
- putLogDebug(300196, formatter.str(), __FILE__, __LINE__);
+ putLogDebug(300195, formatter.str(), __FILE__, __LINE__);
}
/*------DEBUG LOG END------*/
std::deque<ip_replication_temp_data>& get_temp_list(){
return this->temp_list;
}
-
+
};
// test class
(dynamic_cast<ip_replication_data_processor_replacement *>(this->replication_data_processor))->to_get_from_temp_list(temp_data);
BOOST_CHECK_EQUAL(ret, 0);
BOOST_CHECK_EQUAL(this->session_table[ip_hash].last_time, now);
- BOOST_CHECK_EQUAL(this->session_table[ip_hash].rs_endpoint, rs_endpoint);
BOOST_CHECK_EQUAL(temp_data.op_code, 'U');
BOOST_CHECK_EQUAL(temp_data.ip_hash, ip_hash);
BOOST_CHECK_EQUAL(temp_data.last_time, now);
BOOST_CHECK_EQUAL(temp_data.op_code, 'A');
BOOST_CHECK_EQUAL(temp_data.ip_hash, ip_hash2);
BOOST_CHECK_EQUAL(temp_data.last_time, time2);
- BOOST_CHECK_EQUAL(temp_data.rs_endpoint, rs_endpoint2);
+ BOOST_CHECK_EQUAL(temp_data.rs_endpoint, rs_endpoint2);
}
cout << "[19]--------------------------------------------- " << endl;
BOOST_CHECK_EQUAL(this->session_table[ip_hash1].last_time, time1);
BOOST_CHECK_EQUAL(this->session_table[ip_hash1].rs_endpoint, rs_endpoint1);
BOOST_CHECK_EQUAL(this->session_table[ip_hash2].last_time, time2);
- BOOST_CHECK_EQUAL(this->session_table[ip_hash2].rs_endpoint, rs_endpoint2);
BOOST_CHECK_EQUAL(temp_data.op_code, 'U');
BOOST_CHECK_EQUAL(temp_data.ip_hash, ip_hash2);
BOOST_CHECK_EQUAL(temp_data.last_time, time2);
// read_session_data_from_replication_area_test
void read_session_data_from_replication_area_test(){
-
+
cout << "[22]--------------------------------------------- " << endl;
// unit_test[22] replication area初期値でないの場合
{
// % hostname;
// cout << endl;
}
-
+static int calc_hash_2(const boost::asio::ip::tcp::endpoint& cl_endpoint)
+{
+ unsigned int hash = 0;
+ if (cl_endpoint.address().is_v4())
+ {
+ hash= cl_endpoint.address().to_v4().to_ulong() * GOLDEN_RATIO_PRIME;
+ }
+ else
+ {
+ boost::asio::ip::address_v6::bytes_type v6_bytes = cl_endpoint.address().to_v6().to_bytes();
+ boost::asio::ip::address_v4::bytes_type v4_bytes = {{v6_bytes[12],v6_bytes[13],v6_bytes[14],v6_bytes[15]}};
+ boost::asio::ip::address_v4::address_v4 v4_address = boost::asio::ip::address_v4::address_v4(v4_bytes);
+ hash= v4_address.to_ulong() * GOLDEN_RATIO_PRIME;
+ }
+ return hash >> 32 - HASH_TABLE_BITS;
+}
//new operator function
static bool new_flg = false;
void new_install()
BOOST_CHECK_EQUAL(itr->second->last_status, REALSERVER_RECV);
BOOST_CHECK_EQUAL(itr->second->ip_hash, static_cast<int>(l7vs_ip_service_calc_hash(itr->second->client_endpoint)));
BOOST_CHECK_EQUAL(itr->second->buffer_sequence.empty(), true);
-
+
this->handle_session_finalize(boost::this_thread::get_id(), down_thread.get_id());
}
recvlen = 10;
ret = this->handle_client_recv(boost::this_thread::get_id(), recvbuffer, recvlen);
BOOST_CHECK_EQUAL(ret, FINALIZE);
- delete [] thread_data->data_buffer;
+ delete [] thread_data->data_buffer;
session_thread_data_map.clear();
}
BOOST_CHECK_EQUAL(thread_data->current_message_rest_size,thread_data->data_length);
BOOST_CHECK_EQUAL(ret, SORRYSERVER_CONNECT);
BOOST_CHECK_EQUAL(thread_data->last_status, SORRYSERVER_CONNECT);
- delete [] thread_data->data_buffer;
+ delete [] thread_data->data_buffer;
session_thread_data_map.clear();
}
BOOST_CHECK_EQUAL(thread_data->current_message_rest_size,thread_data->data_length);
BOOST_CHECK_EQUAL(ret, SORRYSERVER_CONNECT);
BOOST_CHECK_EQUAL(thread_data->last_status, SORRYSERVER_CONNECT);
- delete [] thread_data->data_buffer;
+ delete [] thread_data->data_buffer;
session_thread_data_map.clear();
}
BOOST_CHECK_EQUAL(thread_data->current_message_rest_size,thread_data->data_length);
BOOST_CHECK_EQUAL(ret, REALSERVER_CONNECT);
BOOST_CHECK_EQUAL(thread_data->last_status, REALSERVER_CONNECT);
- delete [] thread_data->data_buffer;
+ delete [] thread_data->data_buffer;
session_thread_data_map.clear();
}
BOOST_CHECK_EQUAL(thread_data->current_message_rest_size,thread_data->data_length);
BOOST_CHECK_EQUAL(ret, SORRYSERVER_CONNECT);
BOOST_CHECK_EQUAL(thread_data->last_status, SORRYSERVER_CONNECT);
- delete [] thread_data->data_buffer;
+ delete [] thread_data->data_buffer;
session_thread_data_map.clear();
}
ret = this->handle_client_recv(boost::this_thread::get_id(), recvbuffer, recvlen);
BOOST_CHECK_EQUAL(ret, CLIENT_RECV);
BOOST_CHECK_EQUAL(thread_data->last_status, CLIENT_RECV);
- delete [] thread_data->data_buffer;
+ delete [] thread_data->data_buffer;
session_thread_data_map.clear();
}
BOOST_CHECK_EQUAL(thread_data->current_message_rest_size,10u + http_header_len);
BOOST_CHECK_EQUAL(ret, SORRYSERVER_CONNECT);
BOOST_CHECK_EQUAL(thread_data->last_status, SORRYSERVER_CONNECT);
- delete [] thread_data->data_buffer;
+ delete [] thread_data->data_buffer;
session_thread_data_map.clear();
}
BOOST_CHECK_EQUAL(thread_data->current_message_rest_size,10u + http_header_len);
BOOST_CHECK_EQUAL(ret, REALSERVER_CONNECT);
BOOST_CHECK_EQUAL(thread_data->last_status, REALSERVER_CONNECT);
- delete [] thread_data->data_buffer;
+ delete [] thread_data->data_buffer;
session_thread_data_map.clear();
}
BOOST_CHECK_EQUAL(thread_data->current_message_rest_size,48u);
BOOST_CHECK_EQUAL(ret, SORRYSERVER_CONNECT);
BOOST_CHECK_EQUAL(thread_data->last_status, SORRYSERVER_CONNECT);
- delete [] thread_data->data_buffer;
+ delete [] thread_data->data_buffer;
session_thread_data_map.clear();
}
cout << "[118]--------------------------------------------- " << endl;
BOOST_CHECK_EQUAL(thread_data->current_message_rest_size,http_header_len-8);
BOOST_CHECK_EQUAL(ret, SORRYSERVER_CONNECT);
BOOST_CHECK_EQUAL(thread_data->last_status, SORRYSERVER_CONNECT);
- delete [] thread_data->data_buffer;
+ delete [] thread_data->data_buffer;
session_thread_data_map.clear();
}
BOOST_CHECK_EQUAL(thread_data->current_message_rest_size,48u);
BOOST_CHECK_EQUAL(ret, REALSERVER_CONNECT);
BOOST_CHECK_EQUAL(thread_data->last_status, REALSERVER_CONNECT);
- delete [] thread_data->data_buffer;
+ delete [] thread_data->data_buffer;
session_thread_data_map.clear();
}
cout << "[120]--------------------------------------------- " << endl;
BOOST_CHECK_EQUAL(thread_data->current_message_rest_size,http_header_len - 8);
BOOST_CHECK_EQUAL(ret, REALSERVER_CONNECT);
BOOST_CHECK_EQUAL(thread_data->last_status, REALSERVER_CONNECT);
- delete [] thread_data->data_buffer;
+ delete [] thread_data->data_buffer;
session_thread_data_map.clear();
}
BOOST_CHECK_EQUAL(thread_data->current_message_rest_size,69u+100u);
BOOST_CHECK_EQUAL(ret, SORRYSERVER_CONNECT);
BOOST_CHECK_EQUAL(thread_data->last_status, SORRYSERVER_CONNECT);
- delete [] thread_data->data_buffer;
+ delete [] thread_data->data_buffer;
session_thread_data_map.clear();
}
BOOST_CHECK_EQUAL(thread_data->current_message_rest_size,69u+100u);
BOOST_CHECK_EQUAL(ret, REALSERVER_CONNECT);
BOOST_CHECK_EQUAL(thread_data->last_status, REALSERVER_CONNECT);
- delete [] thread_data->data_buffer;
+ delete [] thread_data->data_buffer;
session_thread_data_map.clear();
}
BOOST_CHECK_EQUAL(thread_data->current_message_rest_size,110u);
BOOST_CHECK_EQUAL(ret, SORRYSERVER_CONNECT);
BOOST_CHECK_EQUAL(thread_data->last_status, SORRYSERVER_CONNECT);
- delete [] thread_data->data_buffer;
+ delete [] thread_data->data_buffer;
session_thread_data_map.clear();
}
BOOST_CHECK_EQUAL(thread_data->current_message_rest_size,110u);
BOOST_CHECK_EQUAL(ret, REALSERVER_CONNECT);
BOOST_CHECK_EQUAL(thread_data->last_status, REALSERVER_CONNECT);
- delete [] thread_data->data_buffer;
+ delete [] thread_data->data_buffer;
session_thread_data_map.clear();
}
cout << "[125]--------------------------------------------- " << endl;
ret = this->handle_client_recv(boost::this_thread::get_id(), recvbuffer, recvlen);
BOOST_CHECK_EQUAL(ret, SORRYSERVER_CONNECT);
BOOST_CHECK_EQUAL(thread_data->last_status, SORRYSERVER_CONNECT);
- delete [] thread_data->data_buffer;
+ delete [] thread_data->data_buffer;
session_thread_data_map.clear();
}
ret = this->handle_client_recv(boost::this_thread::get_id(), recvbuffer, recvlen);
BOOST_CHECK_EQUAL(ret, REALSERVER_CONNECT);
BOOST_CHECK_EQUAL(thread_data->last_status, REALSERVER_CONNECT);
- delete [] thread_data->data_buffer;
+ delete [] thread_data->data_buffer;
session_thread_data_map.clear();
}
ret = this->handle_client_recv(boost::this_thread::get_id(), recvbuffer, recvlen);
BOOST_CHECK_EQUAL(ret, SORRYSERVER_CONNECT);
BOOST_CHECK_EQUAL(thread_data->last_status, SORRYSERVER_CONNECT);
- delete [] thread_data->data_buffer;
+ delete [] thread_data->data_buffer;
session_thread_data_map.clear();
}
ret = this->handle_client_recv(boost::this_thread::get_id(), recvbuffer, recvlen);
BOOST_CHECK_EQUAL(ret, REALSERVER_CONNECT);
BOOST_CHECK_EQUAL(thread_data->last_status, REALSERVER_CONNECT);
- delete [] thread_data->data_buffer;
+ delete [] thread_data->data_buffer;
session_thread_data_map.clear();
}
}
boost::mutex::scoped_lock sclock(session_thread_data_map_mutex);
BOOST_CHECK_EQUAL(ret, REALSERVER_CONNECT);
BOOST_CHECK_EQUAL(thread_data->last_status, REALSERVER_CONNECT);
- delete [] thread_data->data_buffer;
+ delete [] thread_data->data_buffer;
session_thread_data_map.erase(boost::this_thread::get_id());
}
}
boost::asio::ip::tcp::endpoint ep2(boost::asio::ip::address::from_string("192.168.120.250"),
12345);
-
+
boost::asio::ip::tcp::endpoint virtual_service_endpoint;
ip_session_table_entry ip_session_entry_data;
memset(this->sorry_uri.c_array(), 0, MAX_OPTION_SIZE);
std::string option;
this->get_option_info(option);
- BOOST_CHECK_EQUAL(strcmp(option.c_str(), "--timeout 0 --no-reschedule --sorry-uri ''"), 0);
+ BOOST_CHECK_EQUAL(strcmp(option.c_str(), "--timeout 0 --no-reschedule --sorry-uri ''"), 0);
}
{
cout << "[415]--------------------------------------------- " << endl;
BOOST_CHECK_EQUAL(strcmp(option.c_str(), "--timeout 3600 --forwarded-for --reschedule --sorry-uri '/sorry'"), 0);
}
}
+
+ //replication_interrupt
+ void replication_interrupt_test(){
+ install_stb_replication_func();
+ unsigned int data_size = 0;
+ void* data_addr = NULL;
+ const boost::asio::ip::tcp::endpoint ep;
+ data_addr = replication_pay_memory( get_name(), &data_size );
+ this->replication_data_processor = new ip_replication_data_processor_stub(
+ (char*)data_addr, data_size, ep, stb_getloglevel,
+ stb_putLogFatal, stb_putLogError, stb_putLogWarn, stb_putLogInfo,
+ stb_putLogDebug);
+ cout << "[416]--------------------------------------------- " << endl;
+ //unit_test[416] op_codeが「A」の場合、replication_dataをreplication_areaに追加する。
+ boost::asio::ip::tcp::endpoint cl_endpoint = string_to_endpoint <boost::asio::ip::tcp> ("172.16.58.239:1234");
+ time_t last_time_A = time(0);
+ int ip_hash_a = (int)calc_hash_2(cl_endpoint);
+ boost::asio::ip::tcp::endpoint real_ep_A;
+ struct ip_replication_temp_data replication_temp_data_add;
+ replication_temp_data_add.op_code='A';
+ replication_temp_data_add.ip_hash=(int)calc_hash_2(cl_endpoint);
+ replication_temp_data_add.last_time=last_time_A;
+ replication_temp_data_add.rs_endpoint=real_ep_A;
+ ip_replication_data_processor_stub* pstub;
+ try
+ {
+ pstub = dynamic_cast<ip_replication_data_processor_stub*> (replication_data_processor);
+ }
+ catch(std::bad_cast& )
+ {
+ std::cout<<"bad_cast:::"<<std::endl;
+ }
+ pstub->get_replication_area()=new ip_replication_data;
+ pstub->register_replication_area_lock(replication_area_lock_stb);
+ pstub->register_replication_area_unlock(replication_area_unlock_stb);
+ pstub->get_temp_list().push_back(replication_temp_data_add);
+ pstub->get_replication_area()->valid=0;
+
+ boost::thread test_thread1(boost::bind(&protocol_module_ip_test_class::replication_interrupt,this));
+ sleep(5);
+ BOOST_CHECK_EQUAL(pstub->get_replication_area()[ip_hash_a].valid,1);
+ BOOST_CHECK_EQUAL(pstub->get_replication_area()[ip_hash_a].last_time,last_time_A);
+ BOOST_CHECK_EQUAL(pstub->get_replication_area()[ip_hash_a].realserver_ip,real_ep_A.address().to_string().c_str());
+ BOOST_CHECK_EQUAL(pstub->get_replication_area()[ip_hash_a].realserver_port,real_ep_A.port());
+ test_thread1.interrupt();
+
+ cout << "[417]--------------------------------------------- " << endl;
+ //unit_test[417] op_codeが「U」、且つip_hashが一致の場合、replication_area中の該当データを更新する。
+ time_t last_time_U = time(0);
+ boost::asio::ip::tcp::endpoint real_ep_U;
+ struct ip_replication_temp_data replication_temp_data_update;
+ replication_temp_data_update.op_code='U';
+ replication_temp_data_update.ip_hash=(int)calc_hash_2(cl_endpoint);
+ replication_temp_data_update.last_time=last_time_U;
+ replication_temp_data_update.rs_endpoint=real_ep_U;
+ pstub->get_temp_list().push_back(replication_temp_data_update);
+ pstub->get_replication_area()->valid=1;
+ boost::thread test_thread2(boost::bind(&protocol_module_ip_test_class::replication_interrupt,this));
+ sleep(5);
+ BOOST_CHECK_EQUAL(pstub->get_replication_area()[ip_hash_a].valid,1);
+ BOOST_CHECK_EQUAL(pstub->get_replication_area()[ip_hash_a].last_time,last_time_U);
+ test_thread2.interrupt();
+ }
};
/***********************************************************************************
3600, obj.get_replication_data_processor(), ingetloglevel,
inputLogFatal, inputLogError, inputLogWarn, inputLogInfo,
inputLogDebug));
-
+
boost::thread_group threads;
for (int i = 0; i < THREAD_COUNT; ++i)
protocol_module_ip_test_class obj;
obj.get_option_info_test();
}
+void replication_interrupt_test()
+{
+ protocol_module_ip_test_class obj;
+ obj.replication_interrupt_test();
+}
+
test_suite* protocol_module_ip_test_main( )
{
ts->add(BOOST_TEST_CASE(&get_data_from_recvbuffer_test));
ts->add(BOOST_TEST_CASE(&put_data_into_sendbuffer_test));
ts->add(BOOST_TEST_CASE(&get_option_info_test));
+ ts->add(BOOST_TEST_CASE(&replication_interrupt_test));
framework::master_test_suite().add(ts);
return 0;
// cout << endl;
}
void stb_putLogDebug( const unsigned int message_id, const std::string& message, const char* file, int line){
- // cout << boost::format( "%s%d%06d %s %s" )
- // % "PM"
- // % LOG_LV_DEBUG
- // % message_id
- // % message.c_str()
- // % hostname;
- // cout << endl;
+ // cout << boost::format( "%s%d%06d %s %s" )
+ // % "PM"
+ // % LOG_LV_DEBUG
+ // % message_id
+ // % message.c_str()
+ // % hostname;
+ // cout << endl;
}
//new operator function
cout << "[128]--------------------------------------------- " << endl;
// unit_test[128] 終了フラグがOFFで、 且つ データサイズが0で、 且つ 新SSLレコードで、
- // unit_test[128] 且つdata_begain_offset が 0で,且つcheck_ssl_record_sendable()の戻り値が-1 (異常)の場合、戻り値をFINALIZEに設定する。
+ // unit_test[128] 且つdata_begain_offset が 0で,且つcheck_ssl_record_sendable()の戻り値が-1 (異常)の場合、戻り値をREALSERVER_SELECTに設定する。
{
thread_data_ptr up_thread_data(new session_thread_data_sslid);
up_thread_data->end_flag = END_FLAG_OFF;
BOOST_CHECK_EQUAL(mem_cmp_result, 0);
BOOST_CHECK_EQUAL(this->session_thread_data_map[boost::this_thread::get_id()]->data_size, 6u);
BOOST_CHECK_EQUAL(this->session_thread_data_map[boost::this_thread::get_id()]->data_begain_offset, 0u);
- BOOST_CHECK_EQUAL(status, FINALIZE);
+ BOOST_CHECK_EQUAL(status, REALSERVER_SELECT);
BOOST_CHECK_EQUAL(status, up_thread_data->last_status);
this->session_thread_data_map.clear();
}
cout << "[129]--------------------------------------------- " << endl;
// unit_test[129] 終了フラグがOFFで、 且つ データサイズが0で、 且つ 新SSLレコードで、
- // unit_test[129] 且つdata_begain_offset > 0で,且つcheck_ssl_record_sendable()の戻り値が-1 (異常)の場合、戻り値をFINALIZEに設定する。
+ // unit_test[129] 且つdata_begain_offset > 0で,且つcheck_ssl_record_sendable()の戻り値が-1 (異常)の場合、戻り値をREALSERVER_SELECTに設定する。
{
thread_data_ptr up_thread_data(new session_thread_data_sslid);
up_thread_data->end_flag = END_FLAG_OFF;
BOOST_CHECK_EQUAL(mem_cmp_result, 0);
BOOST_CHECK_EQUAL(this->session_thread_data_map[boost::this_thread::get_id()]->data_size, 6u);
BOOST_CHECK_EQUAL(this->session_thread_data_map[boost::this_thread::get_id()]->data_begain_offset, 0u);
- BOOST_CHECK_EQUAL(status, FINALIZE);
+ BOOST_CHECK_EQUAL(status, REALSERVER_SELECT);
BOOST_CHECK_EQUAL(status, up_thread_data->last_status);
this->session_thread_data_map.clear();
}
cout << "[138]--------------------------------------------- " << endl;
// unit_test[138] 終了フラグがOFFで、且つ データサイズ > 0、且つ新SSLレコードで,且つdata_begain_offset > 0
// unit_test[138] 且つcheck_ssl_record_sendable()の戻り値が-1(異常)の場合
- // unit_test[138] 戻り値がFINALIZEで設定する。
+ // unit_test[138] 戻り値がREALSERVER_SELECTで設定する。
{
thread_data_ptr up_thread_data(new session_thread_data_sslid);
up_thread_data->end_flag = END_FLAG_OFF;
BOOST_CHECK_EQUAL(mem_cmp_result, 0);
BOOST_CHECK_EQUAL(this->session_thread_data_map[boost::this_thread::get_id()]->data_size, 15u);
BOOST_CHECK_EQUAL(this->session_thread_data_map[boost::this_thread::get_id()]->data_begain_offset, 0u);
- BOOST_CHECK_EQUAL(status, FINALIZE);
+ BOOST_CHECK_EQUAL(status, REALSERVER_SELECT);
BOOST_CHECK_EQUAL(status, up_thread_data->last_status);
delete[] mem_cmp_buffer;
this->session_thread_data_map.clear();
cout << "[139]--------------------------------------------- " << endl;
// unit_test[139] 終了フラグがOFFで、 且つ データサイズ > 0、且つ新SSLレコードで、且つdata_begain_offset = 0
// unit_test[139] 且つcheck_ssl_record_sendable()の戻り値が-1 (異常)の場合
- // unit_test[139] 戻り値がFINALIZEで設定する。
+ // unit_test[139] 戻り値がREALSERVER_SELECTで設定する。
{
thread_data_ptr up_thread_data(new session_thread_data_sslid);
up_thread_data->end_flag = END_FLAG_OFF;
BOOST_CHECK_EQUAL(mem_cmp_result, 0);
BOOST_CHECK_EQUAL(this->session_thread_data_map[boost::this_thread::get_id()]->data_size, 15u);
BOOST_CHECK_EQUAL(this->session_thread_data_map[boost::this_thread::get_id()]->data_begain_offset, 0u);
- BOOST_CHECK_EQUAL(status, FINALIZE);
+ BOOST_CHECK_EQUAL(status, REALSERVER_SELECT);
BOOST_CHECK_EQUAL(status, up_thread_data->last_status);
delete[] mem_cmp_buffer;
this->session_thread_data_map.clear();
cout << "[151]--------------------------------------------- " << endl;
// unit_test[151] selected_realserver が NULLで、 且つhello_message_flagがfalseの場合
- // unit_test[151] 戻り値がFINALIZEで設定する。
+ // unit_test[151] 戻り値がSORRYSERVER_SELECTで設定する。
{
+ this->schedule_tcp = schedule_tcp_func2;
thread_data_ptr up_thread_data(new session_thread_data_sslid);
up_thread_data->selected_realserver = ep2;
up_thread_data->hello_message_flag = false;
= up_thread_data;
status = this->handle_realserver_select(boost::this_thread::get_id(),
rs_endpoint);
- BOOST_CHECK_EQUAL(this->session_thread_data_map[boost::this_thread::get_id()]->end_flag, END_FLAG_ON);
- BOOST_CHECK_EQUAL(status, FINALIZE);
+ BOOST_CHECK_EQUAL(status, SORRYSERVER_SELECT);
BOOST_CHECK_EQUAL(status, up_thread_data->last_status);
this->session_thread_data_map.clear();
}
cout << "[162]--------------------------------------------- " << endl;
// unit_test[162] selected_realserver が NULLで, 且つhello_message_flag が falseの場合
- // unit_test[162] 戻り値がFINALIZEで設定する。
+ // unit_test[162] 戻り値がSORRYSERVER_SELECTで設定する。
{
thread_data_ptr up_thread_data(new session_thread_data_sslid);
up_thread_data->selected_realserver = ep2;
= up_thread_data;
status = this->handle_realserver_select(boost::this_thread::get_id(),
rs_endpoint);
- BOOST_CHECK_EQUAL(this->session_thread_data_map[boost::this_thread::get_id()]->end_flag, END_FLAG_ON);
- BOOST_CHECK_EQUAL(status, FINALIZE);
+ BOOST_CHECK_EQUAL(status, SORRYSERVER_SELECT);
BOOST_CHECK_EQUAL(status, up_thread_data->last_status);
this->session_thread_data_map.clear();
}
cout << "[190]--------------------------------------------- " << endl;
// unit_test[190] データサイズ > 0で, 且つcurrent_record_rest_size が 0で, 且つcheck_ssl_record_sendable()の戻り値が-1(異常)で,且つdata_begain_offsetが0の場合
- // unit_test[190] 戻り値がFINALIZEで設定する。
+ // unit_test[190] 戻り値がREALSERVER_CONNECTで設定する。
{
thread_data_ptr up_thread_data(new session_thread_data_sslid);
up_thread_data->data_size = 10u;
this->session_thread_data_map[boost::this_thread::get_id()]
= up_thread_data;
status = this->handle_realserver_send(boost::this_thread::get_id());
- BOOST_CHECK_EQUAL(this->session_thread_data_map[boost::this_thread::get_id()]->end_flag, END_FLAG_ON);
- BOOST_CHECK_EQUAL(status, FINALIZE);
+ BOOST_CHECK_EQUAL(status, REALSERVER_CONNECT);
BOOST_CHECK_EQUAL(status, up_thread_data->last_status);
this->session_thread_data_map.clear();
}
cout << "[191]--------------------------------------------- " << endl;
// unit_test[191] データサイズ > 0で, 且つcurrent_record_rest_size が 0で, 且つcheck_ssl_record_sendable()の戻り値が-1(異常)で,且つdata_begain_offset>0の場合
- // unit_test[191] 戻り値がFINALIZEで設定する。
+ // unit_test[191] 戻り値がREALSERVER_CONNECTで設定する。
{
thread_data_ptr up_thread_data(new session_thread_data_sslid);
up_thread_data->data_size = 10u;
this->session_thread_data_map[boost::this_thread::get_id()]
= up_thread_data;
status = this->handle_realserver_send(boost::this_thread::get_id());
- BOOST_CHECK_EQUAL(this->session_thread_data_map[boost::this_thread::get_id()]->end_flag, END_FLAG_ON);
- BOOST_CHECK_EQUAL(status, FINALIZE);
+ BOOST_CHECK_EQUAL(status, REALSERVER_CONNECT);
BOOST_CHECK_EQUAL(status, up_thread_data->last_status);
this->session_thread_data_map.clear();
}
cout << "[200]--------------------------------------------- " << endl;
// unit_test[200] データサイズ が 0で, 且つcurrent_record_rest_size が 0で, 且つcheck_ssl_record_sendable()の戻り値が-1(異常)の場合
- // unit_test[200] 戻り値がFINALIZEで設定する。
+ // unit_test[200] 戻り値がCLIENT_CONNECTION_CHECKで設定する。
{
thread_data_ptr down_thread_data(new session_thread_data_sslid);
down_thread_data->data_size = 0u;
rs_endpoint, recvbuffer, recvlen);
mem_cmp_result = memcmp(mem_cmp_buffer, this->session_thread_data_map[boost::this_thread::get_id()]->data_buffer.c_array(), mem_cmp_length);
BOOST_CHECK_EQUAL(mem_cmp_result, 0);
- BOOST_CHECK_EQUAL(this->session_thread_data_map[boost::this_thread::get_id()]->end_flag, END_FLAG_ON);
- BOOST_CHECK_EQUAL(status, FINALIZE);
+ BOOST_CHECK_EQUAL(status, CLIENT_CONNECTION_CHECK);
BOOST_CHECK_EQUAL(status, down_thread_data->last_status);
delete[] mem_cmp_buffer;
this->session_thread_data_map.clear();
cout << "[229]--------------------------------------------- " << endl;
// unit_test[229] データサイズ>0で,且つcurrent_record_rest_sizeが0で,且つcheck_ssl_record_sendable()の戻り値が-1(異常)で,且つdata_begain_offsetが0の場合
- // unit_test[229] 戻り値がFINALIZEで設定する。
+ // unit_test[229] 戻り値がCLIENT_CONNECTION_CHECKで設定する。
{
thread_data_ptr down_thread_data(new session_thread_data_sslid);
down_thread_data->data_size = 10u;
down_thread_data->data_begain_offset = 0u;
this->session_thread_data_map[boost::this_thread::get_id()] = down_thread_data;
status = this->handle_client_send(boost::this_thread::get_id());
- BOOST_CHECK_EQUAL(this->session_thread_data_map[boost::this_thread::get_id()]->end_flag, END_FLAG_ON);
- BOOST_CHECK_EQUAL(status, FINALIZE);
+ BOOST_CHECK_EQUAL(status, CLIENT_CONNECTION_CHECK);
BOOST_CHECK_EQUAL(status, down_thread_data->last_status);
this->session_thread_data_map.clear();
}
cout << "[230]--------------------------------------------- " << endl;
// unit_test[230] データサイズ>0で,且つcurrent_record_rest_sizeが0で,且つcheck_ssl_record_sendable()の戻り値が-1(異常)で,且つdata_begain_offset>0の場合
- // unit_test[230] 戻り値がFINALIZEで設定する。
+ // unit_test[230] 戻り値がCLIENT_CONNECTION_CHECKで設定する。
{
thread_data_ptr down_thread_data(new session_thread_data_sslid);
down_thread_data->data_size = 10u;
down_thread_data->data_begain_offset = 10u;
this->session_thread_data_map[boost::this_thread::get_id()] = down_thread_data;
status = this->handle_client_send(boost::this_thread::get_id());
- BOOST_CHECK_EQUAL(this->session_thread_data_map[boost::this_thread::get_id()]->end_flag, END_FLAG_ON);
- BOOST_CHECK_EQUAL(status, FINALIZE);
+ BOOST_CHECK_EQUAL(status, CLIENT_CONNECTION_CHECK);
BOOST_CHECK_EQUAL(status, down_thread_data->last_status);
this->session_thread_data_map.clear();
}
cout << "[263]--------------------------------------------- " << endl;
// unit_test[263] データサイズ > 0で, 且つcurrent_record_rest_size が 0で, 且つcheck_ssl_record_sendable()の戻り値が-1(異常)で,且つdata_begain_offsetが0の場合
- // unit_test[263] 戻り値がFINALIZEで設定する。
+ // unit_test[263] 戻り値がSORRYSERVER_CONNECTで設定する。
{
thread_data_ptr up_thread_data(new session_thread_data_sslid);
up_thread_data->data_size = 10u;
this->session_thread_data_map[boost::this_thread::get_id()]
= up_thread_data;
status = this->handle_sorryserver_send(boost::this_thread::get_id());
- BOOST_CHECK_EQUAL(this->session_thread_data_map[boost::this_thread::get_id()]->end_flag, END_FLAG_ON);
- BOOST_CHECK_EQUAL(status, FINALIZE);
+ BOOST_CHECK_EQUAL(status, SORRYSERVER_CONNECT);
BOOST_CHECK_EQUAL(status, up_thread_data->last_status);
this->session_thread_data_map.clear();
}
cout << "[264]--------------------------------------------- " << endl;
// unit_test[264] データサイズ > 0で, 且つcurrent_record_rest_size が 0で, 且つcheck_ssl_record_sendable()の戻り値が-1(異常)で,且つdata_begain_offset>0の場合
- // unit_test[264] 戻り値がFINALIZEで設定する。
+ // unit_test[264] 戻り値がSORRYSERVER_CONNECTで設定する。
{
thread_data_ptr up_thread_data(new session_thread_data_sslid);
up_thread_data->data_size = 10u;
this->session_thread_data_map[boost::this_thread::get_id()]
= up_thread_data;
status = this->handle_sorryserver_send(boost::this_thread::get_id());
- BOOST_CHECK_EQUAL(this->session_thread_data_map[boost::this_thread::get_id()]->end_flag, END_FLAG_ON);
- BOOST_CHECK_EQUAL(status, FINALIZE);
+ BOOST_CHECK_EQUAL(status, SORRYSERVER_CONNECT);
BOOST_CHECK_EQUAL(status, up_thread_data->last_status);
this->session_thread_data_map.clear();
}
cout << "[273]--------------------------------------------- " << endl;
// unit_test[273] データサイズ が 0で, 且つcurrent_record_rest_size が 0で, 且つcheck_ssl_record_sendable()の戻り値が-1(異常)の場合
- // unit_test[273] 戻り値がFINALIZEで設定する。
+ // unit_test[273] 戻り値がCLIENT_CONNECTION_CHECKで設定する。
{
thread_data_ptr down_thread_data(new session_thread_data_sslid);
down_thread_data->data_size = 0u;
rs_endpoint, recvbuffer, recvlen);
mem_cmp_result = memcmp(mem_cmp_buffer, this->session_thread_data_map[boost::this_thread::get_id()]->data_buffer.c_array(), mem_cmp_length);
BOOST_CHECK_EQUAL(mem_cmp_result, 0);
- BOOST_CHECK_EQUAL(this->session_thread_data_map[boost::this_thread::get_id()]->end_flag, END_FLAG_ON);
- BOOST_CHECK_EQUAL(status, FINALIZE);
+ BOOST_CHECK_EQUAL(status, CLIENT_CONNECTION_CHECK);
BOOST_CHECK_EQUAL(status, down_thread_data->last_status);
delete[] mem_cmp_buffer;
this->session_thread_data_map.clear();
cout << "[9]------------------------------------------" << endl;
// unit_test[9] recv_length が 6で, 且つrecord_data != NULLで, 且つis_message_from_client が trueの場合
- // unit_test[9] 戻り値が-1(異常)で設定する。
+ // unit_test[9] 戻り値が0(正常)で設定する。
recv_length = 6u;
record_data = new char[recv_length];
record_data[0] = 0x00;
ret = this->check_ssl_record_sendable(is_message_from_client,
record_data, recv_length, all_length, is_hello_message);
BOOST_CHECK(!is_hello_message);
- BOOST_CHECK_EQUAL(ret, -1);
+ BOOST_CHECK_EQUAL(ret, 0);
delete[] record_data;
cout << "[10]------------------------------------------" << endl;
// unit_test[10] recv_length が 6で, 且つrecord_data != NULLで, 且つis_message_from_client が falseの場合
- // unit_test[10] 戻り値が-1(異常)で設定する。
+ // unit_test[10] 戻り値が0(正常)で設定する。
recv_length = 6u;
record_data = new char[recv_length];
record_data[0] = 0x00;
ret = this->check_ssl_record_sendable(is_message_from_client,
record_data, recv_length, all_length, is_hello_message);
BOOST_CHECK(!is_hello_message);
- BOOST_CHECK_EQUAL(ret, -1);
+ BOOST_CHECK_EQUAL(ret, 0);
delete[] record_data;
cout << "[11]------------------------------------------" << endl;
cout << "[21]------------------------------------------" << endl;
// unit_test[21] recv_length > 6で, 且つis_message_from_client が trueで,record_dataがsslレコードでない場合
- // unit_test[21] 戻り値が-1(異常)で設定する。
+ // unit_test[21] 戻り値が0(正常)で設定する。
recv_length = 10u;
record_data = new char[recv_length];
record_data[0] = 0x00;
ret = this->check_ssl_record_sendable(is_message_from_client,
record_data, recv_length, all_length, is_hello_message);
BOOST_CHECK(!is_hello_message);
- BOOST_CHECK_EQUAL(ret, -1);
+ BOOST_CHECK_EQUAL(ret, 0);
delete[] record_data;
cout << "[22]------------------------------------------" << endl;
// unit_test[22] recv_length > 6で, 且つis_message_from_client が falseで,record_dataがsslレコードでない場合
- // unit_test[22] 戻り値が-1(異常)で設定する
+ // unit_test[22] 戻り値が0(正常)で設定する
recv_length = 10u;
record_data = new char[recv_length];
record_data[0] = 0x00;
ret = this->check_ssl_record_sendable(is_message_from_client,
record_data, recv_length, all_length, is_hello_message);
BOOST_CHECK(!is_hello_message);
- BOOST_CHECK_EQUAL(ret, -1);
+ BOOST_CHECK_EQUAL(ret, 0);
delete[] record_data;
cout << "[23]------------------------------------------" << endl;
cout << "[31]------------------------------------------" << endl;
// unit_test[31] recv_length が HELLO_MSG_HEADER_LENGTHで,且つis_message_from_client が trueで, record_dataがsslレコードで,誤りのhello messageの場合
- // unit_test[31] 戻り値が-1(異常)で設定する。
+ // unit_test[31] 戻り値が0(正常)で設定する。
recv_length = HELLO_MSG_HEADER_LENGTH;
record_data = new char[recv_length];
record_data[0] = 0x16;
ret = this->check_ssl_record_sendable(is_message_from_client,
record_data, recv_length, all_length, is_hello_message);
BOOST_CHECK(!is_hello_message);
- BOOST_CHECK_EQUAL(ret, -1);
+ BOOST_CHECK_EQUAL(ret, 0);
delete[] record_data;
cout << "[32]------------------------------------------" << endl;
// unit_test[32] recv_length が HELLO_MSG_HEADER_LENGTHで, 且つis_message_from_client が falseで,record_dataがsslレコードで,誤りのhello messageの場合
- // unit_test[32] 戻り値が-1(異常)で設定する。
+ // unit_test[32] 戻り値が0(正常)で設定する。
recv_length = HELLO_MSG_HEADER_LENGTH;
record_data = new char[recv_length];
record_data[0] = 0x16;
ret = this->check_ssl_record_sendable(is_message_from_client,
record_data, recv_length, all_length, is_hello_message);
BOOST_CHECK(!is_hello_message);
- BOOST_CHECK_EQUAL(ret, -1);
+ BOOST_CHECK_EQUAL(ret, 0);
delete[] record_data;
cout << "[33]------------------------------------------" << endl;
// unit_test[33] recv_length が HELLO_MSG_HEADER_LENGTHで, 且つrecord_dataがsslレコードで,誤りのhello messageの場合
- // unit_test[33] 戻り値が-1(異常)で設定する。
+ // unit_test[33] 戻り値が0(正常)で設定する。
recv_length = HELLO_MSG_HEADER_LENGTH;
record_data = new char[recv_length];
record_data[0] = 0x16;
ret = this->check_ssl_record_sendable(is_message_from_client,
record_data, recv_length, all_length, is_hello_message);
BOOST_CHECK(!is_hello_message);
- BOOST_CHECK_EQUAL(ret, -1);
+ BOOST_CHECK_EQUAL(ret, 0);
delete[] record_data;
cout << "[34]------------------------------------------" << endl;
// unit_test[34] recv_length が HELLO_MSG_HEADER_LENGTHで, 且つis_message_from_client が trueで,record_dataがsslレコードで,誤りのhello messageの場合
- // unit_test[34] 戻り値が-1(異常)で設定する。
+ // unit_test[34] 戻り値が0(正常)で設定する。
recv_length = HELLO_MSG_HEADER_LENGTH;
record_data = new char[recv_length];
record_data[0] = 0x16;
ret = this->check_ssl_record_sendable(is_message_from_client,
record_data, recv_length, all_length, is_hello_message);
BOOST_CHECK(!is_hello_message);
- BOOST_CHECK_EQUAL(ret, -1);
+ BOOST_CHECK_EQUAL(ret, 0);
delete[] record_data;
cout << "[35]------------------------------------------" << endl;
// unit_test[35] recv_length が HELLO_MSG_HEADER_LENGTHで, 且つis_message_from_client が falseで,record_dataがsslレコードで,誤りのhello messageの場合
- // unit_test[35] 戻り値が-1(異常)で設定する。
+ // unit_test[35] 戻り値が0(正常)で設定する。
recv_length = HELLO_MSG_HEADER_LENGTH;
record_data = new char[recv_length];
record_data[0] = 0x16;
ret = this->check_ssl_record_sendable(is_message_from_client,
record_data, recv_length, all_length, is_hello_message);
BOOST_CHECK(!is_hello_message);
- BOOST_CHECK_EQUAL(ret, -1);
+ BOOST_CHECK_EQUAL(ret, 0);
delete[] record_data;
cout << "[36]------------------------------------------" << endl;
// unit_test[36] recv_length が HELLO_MSG_HEADER_LENGTHで, record_dataがsslレコードで,誤りのhello messageの場合
- // unit_test[36] 戻り値が-1(異常)で設定する。
+ // unit_test[36] 戻り値が0(正常)で設定する。
recv_length = HELLO_MSG_HEADER_LENGTH;
record_data = new char[recv_length];
record_data[0] = 0x16;
ret = this->check_ssl_record_sendable(is_message_from_client,
record_data, recv_length, all_length, is_hello_message);
BOOST_CHECK(!is_hello_message);
- BOOST_CHECK_EQUAL(ret, -1);
+ BOOST_CHECK_EQUAL(ret, 0);
delete[] record_data;
cout << "[37]------------------------------------------" << endl;
// unit_test[37] recv_length が HELLO_MSG_HEADER_LENGTHで, 且つrecord_dataがsslレコードで,誤りのhello messageの場合
- // unit_test[37] 戻り値が-1(異常)で設定する。
+ // unit_test[37] 戻り値が0(正常)で設定する。
recv_length = HELLO_MSG_HEADER_LENGTH;
record_data = new char[recv_length];
record_data[0] = 0x16;
ret = this->check_ssl_record_sendable(is_message_from_client,
record_data, recv_length, all_length, is_hello_message);
BOOST_CHECK(!is_hello_message);
- BOOST_CHECK_EQUAL(ret, -1);
+ BOOST_CHECK_EQUAL(ret, 0);
delete[] record_data;
cout << "[38]------------------------------------------" << endl;
// unit_test[38] recv_length が HELLO_MSG_HEADER_LENGTHで, record_dataがsslレコードで,誤りのhello messageの場合
- // unit_test[38] 戻り値が-1(異常)で設定する。
+ // unit_test[38] 戻り値が0(正常)で設定する。
recv_length = HELLO_MSG_HEADER_LENGTH;
record_data = new char[recv_length];
record_data[0] = 0x16;
ret = this->check_ssl_record_sendable(is_message_from_client,
record_data, recv_length, all_length, is_hello_message);
BOOST_CHECK(!is_hello_message);
- BOOST_CHECK_EQUAL(ret, -1);
+ BOOST_CHECK_EQUAL(ret, 0);
delete[] record_data;
cout << "[39]------------------------------------------" << endl;
// unit_test[39] recv_length が HELLO_MSG_HEADER_LENGTHで, record_dataがsslレコードで,誤りのhello messageの場合
- // unit_test[39] 戻り値が-1(異常)で設定する。
+ // unit_test[39] 戻り値が0(正常)で設定する。
recv_length = HELLO_MSG_HEADER_LENGTH;
record_data = new char[recv_length];
record_data[0] = 0x16;
ret = this->check_ssl_record_sendable(is_message_from_client,
record_data, recv_length, all_length, is_hello_message);
BOOST_CHECK(!is_hello_message);
- BOOST_CHECK_EQUAL(ret, -1);
+ BOOST_CHECK_EQUAL(ret, 0);
delete[] record_data;
cout << "[40]------------------------------------------" << endl;
// unit_test[40] recv_length が HELLO_MSG_HEADER_LENGTHで, record_dataがsslレコードで,誤りのhello messageの場合
- // unit_test[40] 戻り値が-1(異常)で設定する。
+ // unit_test[40] 戻り値が0(正常)で設定する。
recv_length = HELLO_MSG_HEADER_LENGTH;
record_data = new char[recv_length];
record_data[0] = 0x16;
ret = this->check_ssl_record_sendable(is_message_from_client,
record_data, recv_length, all_length, is_hello_message);
BOOST_CHECK(!is_hello_message);
- BOOST_CHECK_EQUAL(ret, -1);
+ BOOST_CHECK_EQUAL(ret, 0);
delete[] record_data;
cout << "[41]------------------------------------------" << endl;
// unit_test[41] recv_length が HELLO_MSG_HEADER_LENGTHで, record_dataがsslレコードで,誤りのhello messageの場合
- // unit_test[41] 戻り値が-1(異常)で設定する。
+ // unit_test[41] 戻り値が0(正常)で設定する。
recv_length = HELLO_MSG_HEADER_LENGTH;
record_data = new char[recv_length];
record_data[0] = 0x16;
ret = this->check_ssl_record_sendable(is_message_from_client,
record_data, recv_length, all_length, is_hello_message);
BOOST_CHECK(!is_hello_message);
- BOOST_CHECK_EQUAL(ret, -1);
+ BOOST_CHECK_EQUAL(ret, 0);
delete[] record_data;
cout << "[42]------------------------------------------" << endl;
// unit_test[42] recv_length が HELLO_MSG_HEADER_LENGTHで, record_dataがsslレコードで,誤りのhello messageの場合
- // unit_test[42] 戻り値が-1(異常)で設定する。
+ // unit_test[42] 戻り値が0(正常)で設定する。
recv_length = HELLO_MSG_HEADER_LENGTH;
record_data = new char[recv_length];
record_data[0] = 0x16;
ret = this->check_ssl_record_sendable(is_message_from_client,
record_data, recv_length, all_length, is_hello_message);
BOOST_CHECK(!is_hello_message);
- BOOST_CHECK_EQUAL(ret, -1);
+ BOOST_CHECK_EQUAL(ret, 0);
delete[] record_data;
cout << "[43]------------------------------------------" << endl;
// unit_test[43] recv_length が HELLO_MSG_HEADER_LENGTHで, record_dataがsslレコードで,誤りのhello messageの場合
- // unit_test[43] 戻り値が-1(異常)で設定する。
+ // unit_test[43] 戻り値が0(正常)で設定する。
recv_length = HELLO_MSG_HEADER_LENGTH;
record_data = new char[recv_length];
record_data[0] = 0x16;
ret = this->check_ssl_record_sendable(is_message_from_client,
record_data, recv_length, all_length, is_hello_message);
BOOST_CHECK(!is_hello_message);
- BOOST_CHECK_EQUAL(ret, -1);
+ BOOST_CHECK_EQUAL(ret, 0);
delete[] record_data;
cout << "[44]------------------------------------------" << endl;
cout << "[52]------------------------------------------" << endl;
// unit_test[52] recv_length > HELLO_MSG_HEADER_LENGTHで, 且つis_message_from_client が trueで,record_dataがsslレコードで,誤りのhello messageの場合
- // unit_test[52] 戻り値が-1(異常)で設定する。
+ // unit_test[52] 戻り値が0(正常)で設定する。
recv_length = 100u;
record_data = new char[recv_length];
record_data[0] = 0x16;
ret = this->check_ssl_record_sendable(is_message_from_client,
record_data, recv_length, all_length, is_hello_message);
BOOST_CHECK(!is_hello_message);
- BOOST_CHECK_EQUAL(ret, -1);
+ BOOST_CHECK_EQUAL(ret, 0);
delete[] record_data;
cout << "[53]------------------------------------------" << endl;
// unit_test[53] recv_length > HELLO_MSG_HEADER_LENGTHで, 且つis_message_from_client が falseで,record_dataがsslレコードで,誤りのhello messageの場合
- // unit_test[53] 戻り値が-1(異常)で設定する。
+ // unit_test[53] 戻り値が0(正常)で設定する。
recv_length = 100u;
record_data = new char[recv_length];
record_data[0] = 0x16;
ret = this->check_ssl_record_sendable(is_message_from_client,
record_data, recv_length, all_length, is_hello_message);
BOOST_CHECK(!is_hello_message);
- BOOST_CHECK_EQUAL(ret, -1);
+ BOOST_CHECK_EQUAL(ret, 0);
delete[] record_data;
cout << "[54]------------------------------------------" << endl;
// unit_test[54] recv_length > HELLO_MSG_HEADER_LENGTHで, 且つis_message_from_client が trueで, record_dataがsslレコードで,誤りのhello messageの場合
- // unit_test[54] 戻り値が-1(異常)で設定する。
+ // unit_test[54] 戻り値が0(正常)で設定する。
recv_length = 100u;
record_data = new char[recv_length];
record_data[0] = 0x16;
ret = this->check_ssl_record_sendable(is_message_from_client,
record_data, recv_length, all_length, is_hello_message);
BOOST_CHECK(!is_hello_message);
- BOOST_CHECK_EQUAL(ret, -1);
+ BOOST_CHECK_EQUAL(ret, 0);
delete[] record_data;
cout << "[55]------------------------------------------" << endl;
// unit_test[55] recv_length > HELLO_MSG_HEADER_LENGTHで, 且つis_message_from_client が falseで, record_dataがsslレコードで,誤りのhello messageの場合
- // unit_test[55] 戻り値が-1(異常)で設定する。
+ // unit_test[55] 戻り値が0(正常)で設定する。
recv_length = 100u;
record_data = new char[recv_length];
record_data[0] = 0x16;
ret = this->check_ssl_record_sendable(is_message_from_client,
record_data, recv_length, all_length, is_hello_message);
BOOST_CHECK(!is_hello_message);
- BOOST_CHECK_EQUAL(ret, -1);
+ BOOST_CHECK_EQUAL(ret, 0);
delete[] record_data;
cout << "[56]------------------------------------------" << endl;
// unit_test[56] recv_length > HELLO_MSG_HEADER_LENGTHで, record_dataがsslレコードで,誤りのhello messageの場合
- // unit_test[56] 戻り値が-1(異常)で設定する。
+ // unit_test[56] 戻り値が0(正常)で設定する。
recv_length = 100u;
record_data = new char[recv_length];
record_data[0] = 0x16;
ret = this->check_ssl_record_sendable(is_message_from_client,
record_data, recv_length, all_length, is_hello_message);
BOOST_CHECK(!is_hello_message);
- BOOST_CHECK_EQUAL(ret, -1);
+ BOOST_CHECK_EQUAL(ret, 0);
delete[] record_data;
cout << "[57]------------------------------------------" << endl;
// unit_test[57] recv_length > HELLO_MSG_HEADER_LENGTHで, record_dataがsslレコードで,誤りのhello messageの場合
- // unit_test[57] 戻り値が-1(異常)で設定する。
+ // unit_test[57] 戻り値が0(正常)で設定する。
recv_length = 100u;
record_data = new char[recv_length];
record_data[0] = 0x16;
ret = this->check_ssl_record_sendable(is_message_from_client,
record_data, recv_length, all_length, is_hello_message);
BOOST_CHECK(!is_hello_message);
- BOOST_CHECK_EQUAL(ret, -1);
+ BOOST_CHECK_EQUAL(ret, 0);
delete[] record_data;
cout << "[58]------------------------------------------" << endl;
// unit_test[58] recv_length > HELLO_MSG_HEADER_LENGTHで, record_dataがsslレコードで,誤りのhello messageの場合
- // unit_test[58] 戻り値が-1(異常)で設定する。
+ // unit_test[58] 戻り値が0(正常)で設定する。
recv_length = 100u;
record_data = new char[recv_length];
record_data[0] = 0x16;
ret = this->check_ssl_record_sendable(is_message_from_client,
record_data, recv_length, all_length, is_hello_message);
BOOST_CHECK(!is_hello_message);
- BOOST_CHECK_EQUAL(ret, -1);
+ BOOST_CHECK_EQUAL(ret, 0);
delete[] record_data;
cout << "[59]------------------------------------------" << endl;
// unit_test[59] recv_length > HELLO_MSG_HEADER_LENGTHで, record_dataがsslレコードで,誤りのhello messageの場合
- // unit_test[59] 戻る値が-1(異常)で設定する。
+ // unit_test[59] 戻る値が0(正常)で設定する。
recv_length = 100u;
record_data = new char[recv_length];
record_data[0] = 0x16;
ret = this->check_ssl_record_sendable(is_message_from_client,
record_data, recv_length, all_length, is_hello_message);
BOOST_CHECK(!is_hello_message);
- BOOST_CHECK_EQUAL(ret, -1);
+ BOOST_CHECK_EQUAL(ret, 0);
delete[] record_data;
cout << "[60]------------------------------------------" << endl;
// unit_test[60] recv_length > HELLO_MSG_HEADER_LENGTHで, record_dataがsslレコードで,誤りのhello messageの場合
- // unit_test[60] 戻り値が-1(異常)で設定する。
+ // unit_test[60] 戻り値が0(正常)で設定する。
recv_length = 100u;
record_data = new char[recv_length];
record_data[0] = 0x16;
ret = this->check_ssl_record_sendable(is_message_from_client,
record_data, recv_length, all_length, is_hello_message);
BOOST_CHECK(!is_hello_message);
- BOOST_CHECK_EQUAL(ret, -1);
+ BOOST_CHECK_EQUAL(ret, 0);
delete[] record_data;
cout << "[61]------------------------------------------" << endl;
// unit_test[61] recv_length > HELLO_MSG_HEADER_LENGTHで, record_dataがsslレコードで,誤りのhello messageの場合
- // unit_test[61] 戻り値が-1(異常)で設定する。
+ // unit_test[61] 戻り値が0(正常)で設定する。
recv_length = 100u;
record_data = new char[recv_length];
record_data[0] = 0x16;
ret = this->check_ssl_record_sendable(is_message_from_client,
record_data, recv_length, all_length, is_hello_message);
BOOST_CHECK(!is_hello_message);
- BOOST_CHECK_EQUAL(ret, -1);
+ BOOST_CHECK_EQUAL(ret, 0);
delete[] record_data;
cout << "[62]------------------------------------------" << endl;
// unit_test[62] recv_length > HELLO_MSG_HEADER_LENGTHで, record_dataがsslレコードで,誤りのhello messageの場合
- // unit_test[62] 戻り値が-1(異常)で設定する。
+ // unit_test[62] 戻り値が0(正常)で設定する。
recv_length = 100u;
record_data = new char[recv_length];
record_data[0] = 0x16;
ret = this->check_ssl_record_sendable(is_message_from_client,
record_data, recv_length, all_length, is_hello_message);
BOOST_CHECK(!is_hello_message);
- BOOST_CHECK_EQUAL(ret, -1);
+ BOOST_CHECK_EQUAL(ret, 0);
delete[] record_data;
cout << "[63]------------------------------------------" << endl;
// unit_test[63] recv_length > HELLO_MSG_HEADER_LENGTHで, record_dataがsslレコードで,誤りのhello messageの場合
- // unit_test[63] 戻り値が-1(異常)で設定する。
+ // unit_test[63] 戻り値が0(正常)で設定する。
recv_length = 100u;
record_data = new char[recv_length];
record_data[0] = 0x16;
ret = this->check_ssl_record_sendable(is_message_from_client,
record_data, recv_length, all_length, is_hello_message);
BOOST_CHECK(!is_hello_message);
- BOOST_CHECK_EQUAL(ret, -1);
+ BOOST_CHECK_EQUAL(ret, 0);
delete[] record_data;
cout << "[64]------------------------------------------" << endl;