Ignore to finalize when dbus connection is NULL 09/228509/1
authorwn.jang <wn.jang@samsung.com>
Mon, 23 Mar 2020 02:21:31 +0000 (11:21 +0900)
committerWonnam Jang <wn.jang@samsung.com>
Mon, 23 Mar 2020 10:40:52 +0000 (10:40 +0000)
Change-Id: Ic8b2e6ac2eed8c4611fd9f5c550399e178d4bb7e
(cherry picked from commit ee4d2aeee14d96235d6875768b80eb738d60f3c7)

client/vc_widget_dbus.c

index 0ddb340..a6f2769 100644 (file)
@@ -629,6 +629,18 @@ int vc_widget_dbus_request_finalize(int pid)
                return VC_ERROR_OPERATION_FAILED;
        }
 
+       if (NULL == g_w_conn_listener) {
+               if (g_is_connection_opened) {
+                       SLOG(LOG_ERROR, TAG_VCW, "[ERROR] g_w_conn_listener is NULL abnormally");
+                       pthread_mutex_unlock(&g_w_init_mutex);
+                       return VC_ERROR_OPERATION_FAILED;
+               } else {
+                       SLOG(LOG_INFO, TAG_VCW, "[INFO] g_w_conn_listener is NULL and DBUS connection was closed");
+                       pthread_mutex_unlock(&g_w_init_mutex);
+                       return VC_ERROR_NONE;
+               }
+       }
+
        DBusError err;
        dbus_error_init(&err);