• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

UltraMonkey-L7 V3(multi-thread implementation)


コミットメタ情報

リビジョン9c96ee0f61e10e97d6a8a96bdaebf35afc2ed685 (tree)
日時2013-06-13 16:29:18
作者Hiroaki Nakano <nakano.hiroaki@nttc...>
コミッターHiroaki Nakano

ログメッセージ

Merge branch 'TIME_UTC_fix' into v3.1.0-devel

変更サマリ

差分

--- a/l7vsd/src/l7vsadm.cpp
+++ b/l7vsd/src/l7vsadm.cpp
@@ -3038,7 +3038,12 @@ bool l7vs::l7vsadm::execute(int argc, char *argv[])
30383038
30393039 // Lock retrying.
30403040 boost::xtime xt;
3041+#if BOOST_VERSION >= 105000
3042+ xtime_get(&xt, boost::TIME_UTC_);
3043+#else
30413044 xtime_get(&xt, boost::TIME_UTC);
3045+#endif
3046+
30423047 xt.sec += command_wait_interval;
30433048 boost::thread::sleep(xt);
30443049 }
--- a/l7vsd/src/session_thread_control.cpp
+++ b/l7vsd/src/session_thread_control.cpp
@@ -106,7 +106,12 @@ void session_thread_control::upstream_run()
106106 if (state == WAIT) { // after create or session end. this thread is pooling mode
107107 boost::mutex::scoped_lock lock(upthread_condition_mutex);
108108 boost::xtime wait;
109+#if BOOST_VERSION >= 105000
110+ boost::xtime_get(&wait, boost::TIME_UTC_);
111+#else
109112 boost::xtime_get(&wait, boost::TIME_UTC);
113+#endif
114+
110115 wait.sec += 1;
111116 upthread_running_mutex.unlock();
112117 upthread_condition.timed_wait(lock, wait); // thread is condition wait( start at notify_all() )
@@ -169,7 +174,12 @@ void session_thread_control::downstream_run()
169174 boost::mutex::scoped_lock lock(downthread_condition_mutex);
170175 // downthread_condition.wait( lock ); // thread is condition wait( start at notify_all() )
171176 boost::xtime wait;
177+#if BOOST_VERSION >= 105000
178+ boost::xtime_get(&wait, boost::TIME_UTC_);
179+#else
172180 boost::xtime_get(&wait, boost::TIME_UTC);
181+#endif
182+
173183 wait.sec += 1;
174184 downthread_running_mutex.unlock();
175185 downthread_condition.timed_wait(lock, wait); // thread is condition wait( start at notify_all() )
--- a/l7vsd/src/tcp_session.cpp
+++ b/l7vsd/src/tcp_session.cpp
@@ -822,7 +822,12 @@ void tcp_session::up_thread_run()
822822 } //message alive end.
823823 if (ssl_flag && up_thread_next_call_function.first == UP_FUNC_CLIENT_ACCEPT_EVENT) { //handshake timeout check
824824 boost::xtime now_time;
825+#if BOOST_VERSION >= 105000
826+ boost::xtime_get(&now_time, boost::TIME_UTC_);
827+#else
825828 boost::xtime_get(&now_time, boost::TIME_UTC);
829+#endif
830+
826831 if ((now_time.sec - start_handshake_time.sec) > ssl_handshake_time_out) { // timeout detect.
827832 boost::system::error_code error_code;
828833 client_ssl_socket.close(error_code);
@@ -1123,7 +1128,12 @@ void tcp_session::up_thread_client_accept(const TCP_PROCESS_TYPE_TAG process_typ
11231128 if (ssl_flag) {
11241129 upthread_status = UPTHREAD_LOCK;
11251130 // try ssl handshake
1131+#if BOOST_VERSION >= 105000
1132+ boost::xtime_get(&start_handshake_time, boost::TIME_UTC_);
1133+#else
11261134 boost::xtime_get(&start_handshake_time, boost::TIME_UTC);
1135+#endif
1136+
11271137 client_ssl_socket.setoption(error_code);
11281138 client_ssl_socket.async_handshake(boost::bind(&tcp_session::up_thread_client_handshake_handle,
11291139 this,
@@ -4192,7 +4202,12 @@ void tcp_session::down_thread_sorryserver_handle_async_read_some(tcp_session::TC
41924202 //! milliseconds to boost::xtime converter
41934203 void tcp_session::to_time(int in, boost::xtime &xt)
41944204 {
4205+#if BOOST_VERSION >= 105000
4206+ boost::xtime_get(&xt, boost::TIME_UTC_);
4207+#else
41954208 boost::xtime_get(&xt, boost::TIME_UTC);
4209+#endif
4210+
41964211 xt.sec += (in / 1000);
41974212 xt.nsec += (in % 1000) * 1000000;
41984213 if (xt.nsec >= 1000000000) {