OSDN Git Service

Fixed compile error when using boost 1.50 or higher.
authorShinya TAKEBAYASHI <omoikanenomikoto@gmail.com>
Wed, 1 Apr 2015 06:43:02 +0000 (15:43 +0900)
committerShinya TAKEBAYASHI <omoikanenomikoto@gmail.com>
Wed, 1 Apr 2015 06:44:53 +0000 (15:44 +0900)
l7vsd/src/tcp_session.cpp

index 1333c88..87f16e3 100644 (file)
@@ -840,7 +840,11 @@ void tcp_session::up_thread_run()
                                 }
                                 if (!server_connected_flag && server_connect_time_out != 0) {
                                         boost::xtime    now_time;
+#if BOOST_VERSION >= 105000
+                                        boost::xtime_get(&now_time, boost::TIME_UTC_);
+#else
                                         boost::xtime_get(&now_time, boost::TIME_UTC);
+#endif
                                         if ((now_time.sec - client_connected_time.sec) > server_connect_time_out) {     // timeout detect.
                                                 boost::system::error_code error_code;
                                                 client_socket.close(error_code);
@@ -1139,7 +1143,11 @@ void tcp_session::up_thread_client_accept(const TCP_PROCESS_TYPE_TAG process_typ
                                                   this,
                                                   boost::asio::placeholders::error));
         } else {
+#if BOOST_VERSION >= 105000
+                boost::xtime_get(&client_connected_time, boost::TIME_UTC_);
+#else
                 boost::xtime_get(&client_connected_time, boost::TIME_UTC);
+#endif
                 upthread_status = UPTHREAD_ACTIVE;
         }
         up_thread_next_call_function = up_thread_function_array[func_tag];