From f51de905c3bc191ae8bed73a3de00381b32fdf79 Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Tue, 3 May 2016 21:57:17 +0900 Subject: [PATCH] Removed unnecessary mutex locks Change-Id: Ia03a05cd36b9850ffcb7dec7d3f2a89734ae2324 --- src/legacy_support/websocket.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/legacy_support/websocket.cpp b/src/legacy_support/websocket.cpp index 2725d79..714f65e 100644 --- a/src/legacy_support/websocket.cpp +++ b/src/legacy_support/websocket.cpp @@ -659,8 +659,6 @@ void CWebHelperAgentWebSocket::on_get_return_key_type(unsigned int *type) wait_for_reply_message(); - /* Since we are accessing recved buffer, lock the server mutex again */ - pthread_mutex_lock(&g_ws_server_mutex); std::vector values; /* Check if we received reply for GET_RETURN_KEY_TYPE message */ if (process_recved_messages_until_reply_found( @@ -675,7 +673,6 @@ void CWebHelperAgentWebSocket::on_get_return_key_type(unsigned int *type) } /* Now process the rest in the recv buffer */ process_recved_messages(); - pthread_mutex_unlock(&g_ws_server_mutex); } void CWebHelperAgentWebSocket::on_set_return_key_disable(unsigned int disabled) @@ -723,8 +720,6 @@ void CWebHelperAgentWebSocket::on_get_return_key_disable(unsigned int *disabled) wait_for_reply_message(); - /* Since we are accessing recved buffer, lock the server mutex again */ - pthread_mutex_lock(&g_ws_server_mutex); std::vector values; /* Check if we received reply for GET_RETURN_KEY_DISABLE message */ if (process_recved_messages_until_reply_found( @@ -739,7 +734,6 @@ void CWebHelperAgentWebSocket::on_get_return_key_disable(unsigned int *disabled) } /* Now process the rest in the recv buffer */ process_recved_messages(); - pthread_mutex_unlock(&g_ws_server_mutex); } void CWebHelperAgentWebSocket::on_set_layout(unsigned int layout) @@ -787,8 +781,6 @@ void CWebHelperAgentWebSocket::on_get_layout(unsigned int *layout) wait_for_reply_message(); - /* Since we are accessing recved buffer, lock the server mutex again */ - pthread_mutex_lock(&g_ws_server_mutex); std::vector values; /* Check if we received reply for GET_LAYOUT message */ if (process_recved_messages_until_reply_found( @@ -803,7 +795,6 @@ void CWebHelperAgentWebSocket::on_get_layout(unsigned int *layout) } /* Now process the rest in the recv buffer */ process_recved_messages(); - pthread_mutex_unlock(&g_ws_server_mutex); } void CWebHelperAgentWebSocket::on_reset_input_context(int ic) @@ -845,8 +836,6 @@ void CWebHelperAgentWebSocket::on_process_key_event(unsigned int code, unsigned wait_for_reply_message(); - /* Since we are accessing recved buffer, lock the server mutex again */ - pthread_mutex_lock(&g_ws_server_mutex); std::vector values; /* Check if we received reply for PROCESS_KEY_EVENT message */ if (process_recved_messages_until_reply_found( @@ -861,7 +850,6 @@ void CWebHelperAgentWebSocket::on_process_key_event(unsigned int code, unsigned } /* Now process the rest in the recv buffer */ process_recved_messages(); - pthread_mutex_unlock(&g_ws_server_mutex); } CWebHelperAgentWebSocket* CWebHelperAgentWebSocket::get_current_instance() -- 2.7.4