OSDN Git Service

Ticket#459 2バイト文字、TABの修正
authortakamaru <takamaru@1ed66053-1c2d-0410-8867-f7571e6e31d3>
Wed, 27 Jan 2010 04:52:27 +0000 (04:52 +0000)
committertakamaru <takamaru@1ed66053-1c2d-0410-8867-f7571e6e31d3>
Wed, 27 Jan 2010 04:52:27 +0000 (04:52 +0000)
git-svn-id: http://10.144.169.20/repos/um/branches/l7vsd-3.x-ramiel@9915 1ed66053-1c2d-0410-8867-f7571e6e31d3

l7vsd/include/module_base.h
l7vsd/include/sync_function.h
l7vsd/module/protocol/protocol_module_ip.cpp
l7vsd/src/l7vsadm.cpp
l7vsd/src/session_thread_control.cpp
l7vsd/src/tcp_session.cpp
l7vsd/src/virtualservice_base.cpp

index aab9b66..968c0ee 100644 (file)
@@ -128,12 +128,12 @@ public:
         virtual_service_endpoint_udp = invirtual_service_endpoint_udp;
     }
 
-    //replication用インターフェイス
-    //これが呼ばれたら、replication領域にデータを書き込む
-    //注意:内部でループは不要です。
-    //   ループとタイマー制御はvirtual_serviceで行います。
-    //   virtual_serviceは設定時間に1回replication_interruptをCallします。
-    //   replication_interrupt呼ばれたら1回データ書き込みを行います。
+    // For replication interface
+    // when call this function, write data to replication area.
+    // Caution: Not need loop inside.
+    //      Because Loop and Timer control is in virtual_service.
+    //      virtual_service call replication_interrupt in specified time at once.
+    //      when called, replication_interrupt write data at once.
     //! replication interval interrrupt
     //! timer thread call this function. from virtualservice.
     virtual    void    replication_interrupt() = 0;
index 423d649..9570df2 100644 (file)
@@ -4,9 +4,9 @@
 #include <stdint.h>
 
 
-//    dcasで格納できる最大の値をふたつパッキングした構造体
-//    intptr_tはx86時には32bit長=4byte, x86_64時には8byteとなり、
-//    この構造体のサイズはそれぞれ8byteと16byとなる。
+// structure of packing two max value of dcas
+// when x86, intptr_t size is 32bit=4byte, so structure size is 8byte.
+// when x86_64, intptr_t size is 64bit=8byte, so structure size is 16byte.
 
 struct    dcas_t{
     intptr_t    val;
@@ -14,11 +14,11 @@ struct    dcas_t{
 };
 
 extern "C" bool    __sync_bool_double_compare_and_swap(
-        volatile dcas_t*    addr,        // ターゲットのdcas_tが存在するアドレス
-        intptr_t        new_val1,    // 入れる新しい値1
-        intptr_t        new_val2,    // 入れる新しい値2
-        intptr_t        old_val1,    // 比較する値
-        intptr_t        old_val2 ){    // 比較する値
+        volatile dcas_t*    addr,    // target dcas_t address
+        intptr_t        new_val1,    // new value 1 for input
+        intptr_t        new_val2,    // new value 2 for input
+        intptr_t        old_val1,    // old value 1 for compare
+        intptr_t        old_val2 ){  // old value 2 for compare
 
     char    result;
 #ifndef    __X86_64__
index c94728a..2fc207d 100644 (file)
@@ -2686,10 +2686,10 @@ namespace l7vs
                 session_data_ptr = session_thread_it->second;
             }
 
-            //current_message_rest_size > 0
+            //current_message_rest_size > 0
             if (session_data_ptr->current_message_rest_size > 0)
             {
-                //data size > 0
+                //data size > 0
                 if (session_data_ptr->data_length > 0)
                 {
                     //set return status
@@ -2708,7 +2708,7 @@ namespace l7vs
             //current_message_rest_size is 0
             else
             {
-                //data size > 0
+                //data size > 0
                 if (session_data_ptr->data_length > 0)
                 {
                     //data state is HTTP_BODY
@@ -3428,10 +3428,10 @@ namespace l7vs
                 session_data_ptr = session_thread_it->second;
             }
 
-            //current_message_rest_size > 0
+            //current_message_rest_size > 0
             if (session_data_ptr->current_message_rest_size > 0)
             {
-                //data size > 0
+                //data size > 0
                 if (session_data_ptr->data_length > 0)
                 {
                     //set return status
@@ -3450,7 +3450,7 @@ namespace l7vs
             //current_message_rest_size is 0
             else
             {
-                //data size > 0
+                //data size > 0
                 if (session_data_ptr->data_length> 0)
                 {
                     //data state is HTTP_BODY
@@ -4655,10 +4655,10 @@ namespace l7vs
                 session_data_ptr = session_thread_it->second;
             }
 
-            //current_message_rest_size > 0
+            //current_message_rest_size > 0
             if (session_data_ptr->current_message_rest_size > 0)
             {
-                //data size > 0
+                //data size > 0
                 if (session_data_ptr->data_length > 0)
                 {
                     //set return status
@@ -4677,7 +4677,7 @@ namespace l7vs
             //current_message_rest_size is 0
             else
             {
-                //data size > 0
+                //data size > 0
                 if (session_data_ptr->data_length > 0)
                 {
                     //data state is HTTP_BODY
index 0066c87..779001b 100644 (file)
@@ -352,7 +352,7 @@ bool    l7vs::l7vsadm::parse_vs_func( l7vs::l7vsadm_request::COMMAND_CODE_TAG cm
 
     if( l7vsadm_request::CMD_ADD_VS == cmd && 
         ( count_map["-z"] > 0 || count_map["--ssl"] > 0 ) ) {
-        protocol_module_control&       ctrl 
+        protocol_module_control& ctrl 
                 = protocol_module_control::getInstance();
         ctrl.initialize( L7VS_MODULE_PATH );
         protocol_module_base* module;
index 1434df5..77588f4 100644 (file)
@@ -39,7 +39,7 @@ void    session_thread_control::upstream_run(){
     }
 
     cpu_set_t       mask;
-    //numが1以上なら、その数だけCPU_SETする
+    // when num>0, do CPU_SET times of "num_of_core_uses".
     if( 0 < num_of_core_uses ){
         CPU_ZERO( &mask );
         for( int i = 0; i < num_of_core_uses; ++i ){
@@ -103,7 +103,7 @@ void    session_thread_control::downstream_run(){
         Logger::putLogDebug( LOG_CAT_L7VSD_VIRTUALSERVICE, 4, fmt.str(), __FILE__, __LINE__ );
     }
     cpu_set_t       mask;
-    //numが1以上なら、その数だけCPU_SETする
+    // when num>0, do CPU_SET times of "num_of_core_uses".
     if( 0 < num_of_core_uses ){
         CPU_ZERO( &mask );
         for( int i = 0; i < num_of_core_uses; ++i ){
index 999b714..b9ff957 100644 (file)
@@ -1281,7 +1281,7 @@ namespace l7vs{
     std::string tcp_session::endpoint_to_string(
                 const boost::asio::ip::tcp::endpoint& target_endpoint){
         std::stringstream ret;
-       if( target_endpoint.address().is_v6() ){
+        if( target_endpoint.address().is_v6() ){
             ret << "[" << target_endpoint.address().to_string() << "]:" << target_endpoint.port();
         }else{
             ret << target_endpoint.address().to_string() << ":" << target_endpoint.port();
index ded0f41..dba86f9 100644 (file)
@@ -344,9 +344,9 @@ cpu_set_t    l7vs::virtualservice_base::get_cpu_mask( std::string    nic_name ){
     // read interrupts.
     while( getline( ifs,  buff ) ){
         if( string::npos == buff.find( nic_name ) ) continue;
-        //割り込みIDを取得
+        // get interrupt ID
         algorithm::split( split_vec, buff, algorithm::is_any_of( ":" ));
-        if( !split_vec.size() ) return mask;    //interrupt分割不可
+        if( !split_vec.size() ) return mask;    // cannot split interrupt
         algorithm::trim( split_vec[0] );
         target_interrupt = lexical_cast<unsigned int>( split_vec[0] );
         for( size_t i = 0; i < cpu_nic_map.size(); ++i ){