remove wrapper of checking connection in retry function 20/281620/1
authordyamy-lee <dyamy.lee@samsung.com>
Thu, 15 Sep 2022 08:42:55 +0000 (17:42 +0900)
committerSuyeon Hwang <stom.hwang@samsung.com>
Tue, 20 Sep 2022 05:09:40 +0000 (14:09 +0900)
retry function is called when it is alreday not connected.
So, this remove re-checking connected value, for readability and clear logic

Change-Id: Ifb7ac64d23cdf66d5f4cacf547b7ebf28a6783fd

src/mmi-ipc.c

index 5872c08..2da72b6 100644 (file)
@@ -68,13 +68,10 @@ int mmi_ipc_retry_connection(rpc_port_proxy_mmi_h h)
 {
        LOGI("Retry connection");
 
-       if (mmi_ipc_is_connected() == false) {
-               LOGE("Not Connected.");
-               int ret = rpc_port_proxy_mmi_connect_sync(h);
-               if (ret != RPC_PORT_ERROR_NONE) {
-                       LOGE("Fail to retry connection(%d)", ret);
-                       return MMI_ERROR_OPERATION_FAILED;
-               }
+       int ret = rpc_port_proxy_mmi_connect_sync(h);
+       if (ret != RPC_PORT_ERROR_NONE) {
+               LOGE("Fail to retry connection(%d)", ret);
+               return MMI_ERROR_OPERATION_FAILED;
        }
 
        return MMI_ERROR_NONE;