• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

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

Commit MetaInfo

Revisioncd1ba4fe27c7964667b95bcaa7a4a00a1bb44d00 (tree)
Time2011-12-22 10:50:05
Authorhibari <hibari@git....>
Commitertakeda kenji

Log Message

v3.0.2 packet break bug fix.

Change Summary

Incremental Difference

--- a/l7vsd/src/tcp_session.cpp
+++ b/l7vsd/src/tcp_session.cpp
@@ -1543,7 +1543,7 @@ void tcp_session::up_thread_realserver_send(const TCP_PROCESS_TYPE_TAG process_t
15431543 } else {
15441544 if (error_code == boost::asio::error::try_again) {
15451545 upthread_status = UPTHREAD_LOCK;
1546- func_tag = UP_FUNC_REALSERVER_SEND;
1546+ func_tag = UP_FUNC_REALSERVER_HANDLE_ASEND;
15471547 basic_tcp_socket<boost::asio::ip::tcp>::async_rw_handler_t handler =
15481548 boost::bind(&tcp_session::up_thread_realserver_async_write_some_handler,
15491549 this,
@@ -1558,7 +1558,7 @@ void tcp_session::up_thread_realserver_send(const TCP_PROCESS_TYPE_TAG process_t
15581558 handler
15591559 );
15601560 else
1561- func_tag = UP_FUNC_REALSERVER_DISCONNECT_EVENT;
1561+ func_tag = UP_FUNC_REALSERVER_DISCONNECT;
15621562 } else {
15631563 func_tag = UP_FUNC_REALSERVER_DISCONNECT;
15641564 boost::format fmt("Thread ID[%d] realserver send error: %s");
@@ -2128,7 +2128,7 @@ void tcp_session::up_thread_sorryserver_send(const TCP_PROCESS_TYPE_TAG process_
21282128 } else {
21292129 if (ec == boost::asio::error::try_again) {
21302130 upthread_status = UPTHREAD_LOCK;
2131- func_tag = UP_FUNC_SORRYSERVER_SEND;
2131+ func_tag = UP_FUNC_SORRYSERVER_HANDLE_ASEND;
21322132 basic_tcp_socket<boost::asio::ip::tcp>::async_rw_handler_t handler =
21332133 boost::bind(&tcp_session::up_thread_sorryserver_async_write_some_handler,
21342134 this,
@@ -3561,11 +3561,12 @@ void tcp_session::up_thread_client_handle_async_read_some(const tcp_session::TCP
35613561
35623562 if (!error_code) { // no error
35633563 if (recv_size > 0) {
3564- parent_service.update_up_recv_size(up_thread_data_client_side.get_size());
3564+ up_thread_data_client_side.set_size(recv_size);
3565+ parent_service.update_up_recv_size(recv_size);
35653566 protocol_module_base::EVENT_TAG module_event = protocol_module->handle_client_recv(
35663567 up_thread_id,
35673568 up_thread_data_client_side.get_data(),
3568- up_thread_data_client_side.get_async_len());
3569+ recv_size);
35693570 #ifdef DEBUG
35703571 boost::format fmt("Thread ID[%d] protocol_module->handle_client_recv( upthread_id = %d, downthread_id = %d ) return %s");
35713572 fmt % up_thread_id % down_thread_id % func_tag_to_string(module_event);
@@ -3660,7 +3661,7 @@ void tcp_session::up_thread_realserver_handle_async_write_some(const tcp_session
36603661 std::size_t send_data_size = up_thread_data_dest_side.get_send_size();
36613662
36623663 if (!up_thread_data_dest_side.get_error_code()) { // no error
3663- send_data_size = up_thread_data_dest_side.get_async_len();
3664+ send_data_size += up_thread_data_dest_side.get_async_len();
36643665 up_thread_data_dest_side.set_send_size(send_data_size);
36653666 parent_service.update_up_send_size(up_thread_data_dest_side.get_async_len());
36663667 if (data_size > send_data_size)
@@ -3669,7 +3670,7 @@ void tcp_session::up_thread_realserver_handle_async_write_some(const tcp_session
36693670 func_tag = up_thread_module_event_map[protocol_module->handle_realserver_send(up_thread_id)];
36703671 } else { // error
36713672 if (up_thread_data_dest_side.get_error_code() == boost::asio::error::try_again) {
3672- func_tag = UP_FUNC_REALSERVER_ASEND_HANDLE_EVENT;
3673+ func_tag = UP_FUNC_REALSERVER_HANDLE_ASEND;
36733674 upthread_status = UPTHREAD_LOCK;
36743675 boost::array<char, MAX_BUFFER_SIZE>& send_buff = up_thread_data_dest_side.get_data();
36753676 tcp_socket::async_rw_handler_t handler = boost::bind(&tcp_session::up_thread_realserver_async_write_some_handler,
@@ -3683,6 +3684,8 @@ void tcp_session::up_thread_realserver_handle_async_write_some(const tcp_session
36833684 data_size - send_data_size
36843685 ),
36853686 handler);
3687+ else
3688+ func_tag = UP_FUNC_REALSERVER_DISCONNECT;
36863689 } else {
36873690 func_tag = UP_FUNC_REALSERVER_DISCONNECT;
36883691 boost::format fmt("Thread ID[%d] realserver send error: %s");
@@ -3746,9 +3749,8 @@ void tcp_session::up_thread_sorryserver_handle_async_write_some(const TCP_PROCES
37463749 std::size_t send_data_size = up_thread_data_dest_side.get_send_size();
37473750
37483751 if (!up_thread_data_dest_side.get_error_code()) { //no error
3749- send_data_size = up_thread_data_dest_side.get_async_len();
3752+ send_data_size += up_thread_data_dest_side.get_async_len();
37503753 up_thread_data_dest_side.set_send_size(send_data_size);
3751- parent_service.update_up_send_size(up_thread_data_dest_side.get_async_len());
37523754 if (data_size > send_data_size)
37533755 func_tag = UP_FUNC_SORRYSERVER_SEND;
37543756 else
@@ -3934,7 +3936,8 @@ void tcp_session::down_thread_client_handle_async_write_some(tcp_session::TCP_PR
39343936
39353937 if (!error_code) { //no error
39363938 send_data_size += send_size;
3937- down_thread_data_client_side.set_send_size(send_size);
3939+ down_thread_data_client_side.set_send_size(send_data_size);
3940+ parent_service.update_down_send_size(send_size);
39383941 if (data_size > send_data_size) {
39393942 func_tag = DOWN_FUNC_CLIENT_SEND;
39403943 } else {
@@ -4022,7 +4025,6 @@ void tcp_session::down_thread_sorryserver_handle_async_read_some(tcp_session::TC
40224025 if (!error_code) { // no error
40234026 if (recv_size > 0) { //recv success
40244027 down_thread_data_dest_side.set_size(recv_size);
4025- parent_service.update_down_recv_size(recv_size);
40264028 protocol_module_base::EVENT_TAG module_event =
40274029 protocol_module->handle_sorryserver_recv(down_thread_id,
40284030 sorryserver_endpoint,