//stop main loop
stop();
+ //unload ProtocolModule
if( protomod ){
//finalize ProtocolModule
protomod->finalize();
schedmod = NULL;
}
- //セッションプール開放
+ //release sessions
boost::mutex::scoped_lock lk( sessions_mutex );
for( session_map_type::iterator itr = pool_sessions.begin();
}
//update values
- element.qos_upstream = elem.qos_upstream;
- element.qos_downstream = elem.qos_downstream;
+ if( ULLONG_MAX == elem.qos_upstream )
+ element.qos_upstream = 0ULL;
+ else if( 0ULL != elem.qos_upstream )
+ element.qos_upstream = elem.qos_upstream;
+ if( ULLONG_MAX == elem.qos_downstream )
+ element.qos_downstream = 0ULL;
+ else if( 0ULL != elem.qos_downstream )
+ element.qos_downstream = elem.qos_downstream;
+
//if endpoint of SorryServer equal 255.255.255.255:0,not update
if( elem.sorry_endpoint !=
boost::asio::ip::tcp::endpoint( boost::asio::ip::address::from_string( "0.0.0.0" ), (0) ) ){
for( session_map_type::iterator itr = active_sessions.begin();
itr != active_sessions.end();
++itr ){
- itr->second->get_session()->set_virtual_service_message( l7vs::tcp_session::SORRY_STATE_ENABLE );
+ if( INT_MAX == elem.sorry_flag )
+ itr->second->get_session()->set_virtual_service_message( l7vs::tcp_session::SORRY_STATE_DISABLE );
+ else if( 0 != elem.sorry_flag )
+ itr->second->get_session()->set_virtual_service_message( l7vs::tcp_session::SORRY_STATE_ENABLE );
}
}
}