Révision | 0de3e723bbe29a5e4818053c35af8f6fdef503a4 (tree) |
---|---|
l'heure | 2013-06-10 16:49:51 |
Auteur | Hiroaki Nakano <nakano.hiroaki@nttc...> |
Commiter | Hiroaki Nakano |
#31545: boost 1.50 以上でビルドできない
Signed-off-by: Shinya TAKEBAYASHI <takebayashi.shinya@nttcom.co.jp>
Reviewed-by: Hiroaki Nakano <nakano.hiroaki@nttcom.co.jp>
@@ -3002,7 +3002,12 @@ bool l7vs::l7vsadm::execute(int argc, char *argv[]) | ||
3002 | 3002 | |
3003 | 3003 | // Lock retrying. |
3004 | 3004 | boost::xtime xt; |
3005 | +#if BOOST_VERSION >= 105000 | |
3006 | + xtime_get(&xt, boost::TIME_UTC_); | |
3007 | +#else | |
3005 | 3008 | xtime_get(&xt, boost::TIME_UTC); |
3009 | +#endif | |
3010 | + | |
3006 | 3011 | xt.sec += command_wait_interval; |
3007 | 3012 | boost::thread::sleep(xt); |
3008 | 3013 | } |
@@ -103,7 +103,12 @@ void session_thread_control::upstream_run() | ||
103 | 103 | if (state == WAIT) { // after create or session end. this thread is pooling mode |
104 | 104 | boost::mutex::scoped_lock lock(upthread_condition_mutex); |
105 | 105 | boost::xtime wait; |
106 | +#if BOOST_VERSION >= 105000 | |
107 | + boost::xtime_get(&wait, boost::TIME_UTC_); | |
108 | +#else | |
106 | 109 | boost::xtime_get(&wait, boost::TIME_UTC); |
110 | +#endif | |
111 | + | |
107 | 112 | wait.sec += 1; |
108 | 113 | upthread_running_mutex.unlock(); |
109 | 114 | upthread_condition.timed_wait(lock, wait); // thread is condition wait( start at notify_all() ) |
@@ -166,7 +171,12 @@ void session_thread_control::downstream_run() | ||
166 | 171 | boost::mutex::scoped_lock lock(downthread_condition_mutex); |
167 | 172 | // downthread_condition.wait( lock ); // thread is condition wait( start at notify_all() ) |
168 | 173 | boost::xtime wait; |
174 | +#if BOOST_VERSION >= 105000 | |
175 | + boost::xtime_get(&wait, boost::TIME_UTC_); | |
176 | +#else | |
169 | 177 | boost::xtime_get(&wait, boost::TIME_UTC); |
178 | +#endif | |
179 | + | |
170 | 180 | wait.sec += 1; |
171 | 181 | downthread_running_mutex.unlock(); |
172 | 182 | downthread_condition.timed_wait(lock, wait); // thread is condition wait( start at notify_all() ) |
@@ -813,7 +813,12 @@ void tcp_session::up_thread_run() | ||
813 | 813 | } //message alive end. |
814 | 814 | if (ssl_flag && up_thread_next_call_function.first == UP_FUNC_CLIENT_ACCEPT_EVENT) { //handshake timeout check |
815 | 815 | boost::xtime now_time; |
816 | +#if BOOST_VERSION >= 105000 | |
817 | + boost::xtime_get(&now_time, boost::TIME_UTC_); | |
818 | +#else | |
816 | 819 | boost::xtime_get(&now_time, boost::TIME_UTC); |
820 | +#endif | |
821 | + | |
817 | 822 | if ((now_time.sec - start_handshake_time.sec) > ssl_handshake_time_out) { // timeout detect. |
818 | 823 | boost::system::error_code error_code; |
819 | 824 | client_ssl_socket.close(error_code); |
@@ -1101,7 +1106,12 @@ void tcp_session::up_thread_client_accept(const TCP_PROCESS_TYPE_TAG process_typ | ||
1101 | 1106 | if (ssl_flag) { |
1102 | 1107 | upthread_status = UPTHREAD_LOCK; |
1103 | 1108 | // try ssl handshake |
1109 | +#if BOOST_VERSION >= 105000 | |
1110 | + boost::xtime_get(&start_handshake_time, boost::TIME_UTC_); | |
1111 | +#else | |
1104 | 1112 | boost::xtime_get(&start_handshake_time, boost::TIME_UTC); |
1113 | +#endif | |
1114 | + | |
1105 | 1115 | client_ssl_socket.setoption(error_code); |
1106 | 1116 | client_ssl_socket.async_handshake(boost::bind(&tcp_session::up_thread_client_handshake_handle, |
1107 | 1117 | this, |
@@ -4140,7 +4150,12 @@ void tcp_session::down_thread_sorryserver_handle_async_read_some(tcp_session::TC | ||
4140 | 4150 | //! milliseconds to boost::xtime converter |
4141 | 4151 | void tcp_session::to_time(int in, boost::xtime &xt) |
4142 | 4152 | { |
4153 | +#if BOOST_VERSION >= 105000 | |
4154 | + boost::xtime_get(&xt, boost::TIME_UTC_); | |
4155 | +#else | |
4143 | 4156 | boost::xtime_get(&xt, boost::TIME_UTC); |
4157 | +#endif | |
4158 | + | |
4144 | 4159 | xt.sec += (in / 1000); |
4145 | 4160 | xt.nsec += (in % 1000) * 1000000; |
4146 | 4161 | if (xt.nsec >= 1000000000) { |