From 1c3ff3adcfd899a41a5262d7b0d8246aacfbe13f Mon Sep 17 00:00:00 2001 From: yamada Date: Wed, 9 Dec 2009 12:01:59 +0000 Subject: [PATCH] =?utf8?q?tcp=5Fsession=20=E3=82=A2=E3=82=AF=E3=82=BB?= =?utf8?q?=E3=83=97=E3=83=88=E3=82=A4=E3=83=99=E3=83=B3=E3=83=88=E4=BF=AE?= =?utf8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: http://10.144.169.20/repos/um/branches/l7vsd-3.x-ramiel@8907 1ed66053-1c2d-0410-8867-f7571e6e31d3 --- l7vsd/src/tcp_session.cpp | 48 ---------------------- .../session_test/tcp_session/tcp_session_test.cpp | 12 +++--- 2 files changed, 6 insertions(+), 54 deletions(-) diff --git a/l7vsd/src/tcp_session.cpp b/l7vsd/src/tcp_session.cpp index ea4a5229..c4c9fdc1 100644 --- a/l7vsd/src/tcp_session.cpp +++ b/l7vsd/src/tcp_session.cpp @@ -1214,54 +1214,6 @@ namespace l7vs{ return; } -/* // Handshake start - if (ssl_flag) { - //----Debug log---------------------------------------------------------------------- - if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) { - std::stringstream buf; - buf << "Thread ID["; - buf << boost::this_thread::get_id(); - buf << "] ssl session handshaking start : "; - buf << "set handshake timer ["; - buf << ssl_handshake_time_out; - buf << "]"; - Logger::putLogDebug( LOG_CAT_L7VSD_SESSION, 999, buf.str(), __FILE__, __LINE__ ); - } - //----Debug log---------------------------------------------------------------------- -// ssl_handshake_flag = false; - //regist handshake timer event handler - ssl_handshake_timer.reset(new boost::asio::deadline_timer(io)); - ssl_handshake_timer->expires_from_now(boost::posix_time::seconds(ssl_handshake_time_out)); - ssl_handshake_timer->async_wait(boost::bind(&tcp_session::handle_handshake_timer, - this, - boost::asio::placeholders::error)); - // do handshake. - bool bres = client_ssl_socket.handshake(boost::asio::ssl::stream_base::server); - // handshke timer operation cancel. - ssl_handshake_timer->cancel(); - if (unlikely(!bres)) { - //Error handshake failed - std::stringstream buf; - buf << "Thread ID["; - buf << boost::this_thread::get_id(); - buf << "] ssl session handshaking failed"; - Logger::putLogError( LOG_CAT_L7VSD_SESSION, 999, buf.str(), __FILE__, __LINE__ ); - up_thread_exit(process_type); - return; - } - // set handshaked flag. -// handshaked = true; - //----Debug log---------------------------------------------------------------------- - if (unlikely(LOG_LV_DEBUG == Logger::getLogLevel(LOG_CAT_L7VSD_SESSION))) { - std::stringstream buf; - buf << "Thread ID["; - buf << boost::this_thread::get_id(); - buf << "] ssl session handshaking end"; - Logger::putLogDebug( LOG_CAT_L7VSD_SESSION, 999, buf.str(), __FILE__, __LINE__ ); - } - //----Debug log---------------------------------------------------------------------- - } -*/ up_thread_function_pair func = up_thread_function_array[func_type->second]; if(unlikely( !func.second )){ //Error not find function map diff --git a/l7vsd/unit_tests/session_test/tcp_session/tcp_session_test.cpp b/l7vsd/unit_tests/session_test/tcp_session/tcp_session_test.cpp index 0e8c4e3c..1b28c310 100644 --- a/l7vsd/unit_tests/session_test/tcp_session/tcp_session_test.cpp +++ b/l7vsd/unit_tests/session_test/tcp_session/tcp_session_test.cpp @@ -10520,7 +10520,7 @@ void up_thread_sorryserver_send_test(){ BOOST_MESSAGE( "----- up_thread_sorryserver_send test end -----" ); } -/* + // down_thread_client_send test void down_thread_client_send_test(){ BOOST_MESSAGE( "----- down_thread_client_send test end -----" ); @@ -10761,7 +10761,7 @@ void down_thread_client_send_test(){ BOOST_MESSAGE( "----- down_thread_client_send test end -----" ); } -*/ + //up_thread_realserver_connect test //up_thread_realserver_connect test class @@ -12247,8 +12247,8 @@ test_suite* init_unit_test_suite( int argc, char* argv[] ){ //NG ts->add( BOOST_TEST_CASE( &up_thread_all_socket_close_test) ); //NG ts->add( BOOST_TEST_CASE( &down_thread_all_socket_close_test) ); - ts->add( BOOST_TEST_CASE( &up_thread_client_disconnect_test) ); - ts->add( BOOST_TEST_CASE( &down_thread_client_disconnect_test) ); +// ts->add( BOOST_TEST_CASE( &up_thread_client_disconnect_test) ); +// ts->add( BOOST_TEST_CASE( &down_thread_client_disconnect_test) ); // ts->add( BOOST_TEST_CASE( &up_thread_sorryserver_disconnect_test) ); // ts->add( BOOST_TEST_CASE( &down_thread_sorryserver_disconnect_test) ); // ts->add( BOOST_TEST_CASE( &up_thread_realserver_connect_event_test) ); @@ -12262,7 +12262,7 @@ test_suite* init_unit_test_suite( int argc, char* argv[] ){ // ts->add( BOOST_TEST_CASE( &down_thread_sorryserver_receive_test) ); // ts->add( BOOST_TEST_CASE( &up_thread_realserver_send_test) ); // ts->add( BOOST_TEST_CASE( &up_thread_sorryserver_send_test) ); -//NG ts->add( BOOST_TEST_CASE( &down_thread_client_send_test) ); + ts->add( BOOST_TEST_CASE( &down_thread_client_send_test) ); // ts->add( BOOST_TEST_CASE( &up_thread_realserver_connect_test) ); // ts->add( BOOST_TEST_CASE( &up_thread_sorryserver_connect_test) ); // ts->add( BOOST_TEST_CASE( &up_thread_realserver_disconnect_test) ); @@ -12285,7 +12285,7 @@ test_suite* init_unit_test_suite( int argc, char* argv[] ){ // ts->add( BOOST_TEST_CASE( &up_thread_sorry_disable_event_test ) ); // ts->add( BOOST_TEST_CASE( &down_thread_sorry_enable_event_test ) ); // ts->add( BOOST_TEST_CASE( &down_thread_sorry_disable_event_test ) ); -//NG ts->add( BOOST_TEST_CASE( &up_thread_client_accept_event_test ) ); + ts->add( BOOST_TEST_CASE( &up_thread_client_accept_event_test ) ); // ts->add( BOOST_TEST_CASE( &up_thread_client_respond_event_test ) ); // ts->add( BOOST_TEST_CASE( &down_thread_client_respond_event_test ) ); -- 2.11.0