Added Coverage exclude comments 78/79778/2
authorYounho Park <younho.park@samsung.com>
Wed, 13 Jul 2016 01:38:53 +0000 (10:38 +0900)
committerYounho Park <younho.park@samsung.com>
Wed, 13 Jul 2016 01:46:04 +0000 (10:46 +0900)
Change-Id: I4330b0d82f52165254b4453a071f53d619a69eda
Signed-off-by: Younho Park <younho.park@samsung.com>
api/client/src/dbus/dbus_client.c
api/client/src/dbus/dbus_client_layer.c
api/client/src/dbus/dbus_client_storage.c
api/client/src/service_adaptor_client.c
api/client/src/service_adaptor_client_storage.c
api/client/src/util/service_adaptor_client_util.c
server/src/service-adaptor-message.c
server/src/service-adaptor-push.c
server/src/service-adaptor.c

index b76c2c67cb48964046ea1be04c2a044a89ebe8ba..673adda8eec834228623131217b69ceac4ff8437 100644 (file)
@@ -205,17 +205,17 @@ static int __dbus_connection_init(dbus_service_adaptor_client_thread_data_s *thr
        GError *error = NULL;
 
        if ((NULL != connection) || (sac_interface_proxy)) {
-               FUNC_STOP();
-               return -1;
+               FUNC_STOP(); /* LCOV_EXCL_LINE */
+               return -1; /* LCOV_EXCL_LINE */
        }
 
        connection = g_bus_get_sync(G_BUS_TYPE_SESSION, NULL, &error);
 
        if (NULL == connection) {
-               g_error_free(error);
+               g_error_free(error); /* LCOV_EXCL_LINE */
 
-               FUNC_STOP();
-               return -1;
+               FUNC_STOP(); /* LCOV_EXCL_LINE */
+               return -1; /* LCOV_EXCL_LINE */
        } else {
                sac_interface_proxy = g_dbus_proxy_new_sync(connection,
                                G_DBUS_PROXY_FLAGS_NONE,
@@ -227,13 +227,13 @@ static int __dbus_connection_init(dbus_service_adaptor_client_thread_data_s *thr
                                &error);
 
                if (NULL == sac_interface_proxy) {
-                       g_error_free(error);
+                       g_error_free(error); /* LCOV_EXCL_LINE */
 
-                       g_object_unref(connection);
-                       connection = NULL;
+                       g_object_unref(connection); /* LCOV_EXCL_LINE */
+                       connection = NULL; /* LCOV_EXCL_LINE */
 
-                       FUNC_STOP();
-                       return -1;
+                       FUNC_STOP(); /* LCOV_EXCL_LINE */
+                       return -1; /* LCOV_EXCL_LINE */
                }
        }
 
@@ -246,14 +246,14 @@ static int __dbus_connection_init(dbus_service_adaptor_client_thread_data_s *thr
                        NULL);
 
        if (0 == watcher_id) {
-               g_object_unref(sac_interface_proxy);
-               sac_interface_proxy = NULL;
+               g_object_unref(sac_interface_proxy); /* LCOV_EXCL_LINE */
+               sac_interface_proxy = NULL; /* LCOV_EXCL_LINE */
 
-               g_object_unref(connection);
-               connection = NULL;
+               g_object_unref(connection); /* LCOV_EXCL_LINE */
+               connection = NULL; /* LCOV_EXCL_LINE */
 
-               FUNC_STOP();
-               return -1;
+               FUNC_STOP(); /* LCOV_EXCL_LINE */
+               return -1; /* LCOV_EXCL_LINE */
        }
 
        int res = g_signal_connect(sac_interface_proxy,
@@ -262,17 +262,17 @@ static int __dbus_connection_init(dbus_service_adaptor_client_thread_data_s *thr
                        NULL);
 
        if (0 == res) {
-               g_object_unref(sac_interface_proxy);
-               sac_interface_proxy = NULL;
+               g_object_unref(sac_interface_proxy); /* LCOV_EXCL_LINE */
+               sac_interface_proxy = NULL; /* LCOV_EXCL_LINE */
 
-               g_object_unref(connection);
-               connection = NULL;
+               g_object_unref(connection); /* LCOV_EXCL_LINE */
+               connection = NULL; /* LCOV_EXCL_LINE */
 
-               g_bus_unwatch_name(watcher_id);
-               watcher_id = 0;
+               g_bus_unwatch_name(watcher_id); /* LCOV_EXCL_LINE */
+               watcher_id = 0; /* LCOV_EXCL_LINE */
 
-               FUNC_STOP();
-               return -1;
+               FUNC_STOP(); /* LCOV_EXCL_LINE */
+               return -1; /* LCOV_EXCL_LINE */
        }
 
        FUNC_END();
@@ -314,7 +314,7 @@ static void on_name_appeared(GDBusConnection *connection,
        }
        FUNC_END();
 }
-//LCOV_EXCL_START
+/* LCOV_EXCL_START */
 static void on_name_vanished(GDBusConnection *connection,
                                                const gchar *name,
                                                gpointer user_data)
@@ -332,7 +332,6 @@ static void on_name_vanished(GDBusConnection *connection,
        }
        FUNC_END();
 }
-//LCOV_EXCL_STOP
 
 static void _service_signal_emitter(void *data)
 {
@@ -353,6 +352,7 @@ static void _service_signal_emitter(void *data)
        g_thread_unref(g_thread_self());
        FUNC_END();
 }
+/* LCOV_EXCL_STOP */
 
 static void on_signal(GDBusProxy *proxy,
                                                gchar *sender_name,
@@ -394,16 +394,16 @@ int _dbus_client_service_adaptor_init()
 
        if (NULL != dbusClientThread) {
                /* D-Bus client thread is already running */
-               FUNC_STOP();
-               return -1;
+               FUNC_STOP(); /* LCOV_EXCL_LINE */
+               return -1; /* LCOV_EXCL_LINE */
        }
 
        dbus_service_adaptor_client_thread_data_s *thread_data =
                        (dbus_service_adaptor_client_thread_data_s *) calloc(1, sizeof(dbus_service_adaptor_client_thread_data_s));
 
        if (NULL == thread_data) {
-               FUNC_STOP();
-               return -1;
+               FUNC_STOP(); /* LCOV_EXCL_LINE */
+               return -1; /* LCOV_EXCL_LINE */
        }
 
        g_mutex_init(&thread_data->connection_mutex);
@@ -417,10 +417,10 @@ int _dbus_client_service_adaptor_init()
        while (!thread_data->connection_cond_signaled) {
                if (!g_cond_wait_until(&thread_data->connection_cond, &thread_data->connection_mutex, timeout)) {
                        /* timeout */
-                       g_mutex_unlock(&thread_data->connection_mutex);
+                       g_mutex_unlock(&thread_data->connection_mutex); /* LCOV_EXCL_LINE */
 
-                       FUNC_STOP();
-                       return -1;
+                       FUNC_STOP(); /* LCOV_EXCL_LINE */
+                       return -1; /* LCOV_EXCL_LINE */
                }
        }
        g_mutex_unlock(&thread_data->connection_mutex);
@@ -451,14 +451,14 @@ void _dbus_client_service_adaptor_deinit()
        }
 
        if (NULL != dbusClientMainLoop) {
-               g_main_loop_unref(dbusClientMainLoop);
-               dbusClientMainLoop = NULL;
+               g_main_loop_unref(dbusClientMainLoop); /* LCOV_EXCL_LINE */
+               dbusClientMainLoop = NULL; /* LCOV_EXCL_LINE */
        }
 
        if (NULL != dbusClientMainContext) {
-               g_main_context_pop_thread_default(dbusClientMainContext);
-               g_main_context_unref(dbusClientMainContext);
-               dbusClientMainContext = NULL;
+               g_main_context_pop_thread_default(dbusClientMainContext); /* LCOV_EXCL_LINE */
+               g_main_context_unref(dbusClientMainContext); /* LCOV_EXCL_LINE */
+               dbusClientMainContext = NULL; /* LCOV_EXCL_LINE */
        }
 
        _queue_clear_task();
@@ -466,33 +466,6 @@ void _dbus_client_service_adaptor_deinit()
        FUNC_END();
 }
 
-/**
- * Adds string into variant builder
- * @param builder Builder
- * @param data String to be added
- */
-/*
-void __safe_g_variant_builder_add_string(GVariantBuilder *builder,
-                                               const char *data)
-{
-       if (NULL == data) {
-               g_variant_builder_add(builder, "s", "");
-       } else {
-               g_variant_builder_add(builder, "s", data);
-       }
-}
-
-void __safe_g_variant_builder_add_array_string(GVariantBuilder *builder,
-                                               const char *data)
-{
-       if (NULL == data) {
-               g_variant_builder_add(builder, "(s)", "");
-       } else {
-               g_variant_builder_add(builder, "(s)", data);
-       }
-}
-*/
-
 char *ipc_g_variant_dup_string(GVariant *string)
 {
        char *ret = g_variant_dup_string(string, NULL);
@@ -538,18 +511,18 @@ int _dbus_connect_service_adaptor(service_adaptor_error_s *error)
                        &g_error);
 
        if (NULL == call_result) {
-               error->code = SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE;
-               ret = SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE;
+               error->code = SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE; /* LCOV_EXCL_LINE */
+               ret = SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE; /* LCOV_EXCL_LINE */
 
-               if (NULL != g_error) {
-                       error->msg = __SAFE_STRDUP(g_error->message);
-                       g_error_free(g_error);
+               if (NULL != g_error) { /* LCOV_EXCL_LINE */
+                       error->msg = __SAFE_STRDUP(g_error->message); /* LCOV_EXCL_LINE */
+                       g_error_free(g_error); /* LCOV_EXCL_LINE */
                }
        } else {
                if (FALSE == g_variant_is_of_type(call_result, G_VARIANT_TYPE("(ts)"))) {
-                       error->code = SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE;
-                       error->msg = strdup("D-Bus return type error");
-                       ret = SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE;
+                       error->code = SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE; /* LCOV_EXCL_LINE */
+                       error->msg = strdup("D-Bus return type error"); /* LCOV_EXCL_LINE */
+                       ret = SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE; /* LCOV_EXCL_LINE */
                } else {
                        GVariant *call_result_struct[2];
                        call_result_struct[0] = g_variant_get_child_value(call_result, 0);
@@ -558,9 +531,9 @@ int _dbus_connect_service_adaptor(service_adaptor_error_s *error)
                        uint64_t remote_call_result = g_variant_get_uint64(call_result_struct[0]);
 
                        if (SERVICE_ADAPTOR_ERROR_NONE != remote_call_result) {
-                               error->code = remote_call_result;
-                               error->msg = ipc_g_variant_dup_string(call_result_struct[1]);
-                               ret = SERVICE_ADAPTOR_ERROR_PLUGIN_FAILED;
+                               error->code = remote_call_result; /* LCOV_EXCL_LINE */
+                               error->msg = ipc_g_variant_dup_string(call_result_struct[1]); /* LCOV_EXCL_LINE */
+                               ret = SERVICE_ADAPTOR_ERROR_PLUGIN_FAILED; /* LCOV_EXCL_LINE */
                        }
 
                        g_variant_unref(call_result_struct[0]);
@@ -599,18 +572,18 @@ int _dbus_get_plugin_list(plugin_entry_t ***plugin_list,
                        &g_error);
 
        if (NULL == call_result) {
-               error->code = SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE;
-               ret = SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE;
+               error->code = SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE; /* LCOV_EXCL_LINE */
+               ret = SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE; /* LCOV_EXCL_LINE */
 
-               if (NULL != g_error) {
-                       error->msg = __SAFE_STRDUP(g_error->message);
-                       g_error_free(g_error);
+               if (NULL != g_error) { /* LCOV_EXCL_LINE */
+                       error->msg = __SAFE_STRDUP(g_error->message); /* LCOV_EXCL_LINE */
+                       g_error_free(g_error); /* LCOV_EXCL_LINE */
                }
        } else {
                if (FALSE == g_variant_is_of_type(call_result, G_VARIANT_TYPE(MAKE_RETURN_TYPE(plugin_list_type)))) {
-                       error->code = SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE;
-                       error->msg = strdup("D-Bus return type error");
-                       ret = SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE;
+                       error->code = SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE; /* LCOV_EXCL_LINE */
+                       error->msg = strdup("D-Bus return type error"); /* LCOV_EXCL_LINE */
+                       ret = SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE; /* LCOV_EXCL_LINE */
                } else {
                        GVariant *call_result_struct[3];
                        call_result_struct[0] = g_variant_get_child_value(call_result, 0);
@@ -620,9 +593,9 @@ int _dbus_get_plugin_list(plugin_entry_t ***plugin_list,
                        uint64_t remote_call_result = g_variant_get_uint64(call_result_struct[1]);
 
                        if (SERVICE_ADAPTOR_ERROR_NONE != remote_call_result) {
-                               error->code = remote_call_result;
-                               error->msg = ipc_g_variant_dup_string(call_result_struct[2]);
-                               ret = SERVICE_ADAPTOR_ERROR_PLUGIN_FAILED;
+                               error->code = remote_call_result; /* LCOV_EXCL_LINE */
+                               error->msg = ipc_g_variant_dup_string(call_result_struct[2]); /* LCOV_EXCL_LINE */
+                               ret = SERVICE_ADAPTOR_ERROR_PLUGIN_FAILED; /* LCOV_EXCL_LINE */
                        } else {
                                gsize list_count = g_variant_n_children(call_result_struct[0]);
 
@@ -651,8 +624,8 @@ int _dbus_get_plugin_list(plugin_entry_t ***plugin_list,
                                        }
                                        *plugin_list = plugins;
                                } else {
-                                       *plugins_len = (unsigned int) 0;
-                                       ret = SERVICE_ADAPTOR_ERROR_UNKNOWN;
+                                       *plugins_len = (unsigned int) 0; /* LCOV_EXCL_LINE */
+                                       ret = SERVICE_ADAPTOR_ERROR_UNKNOWN; /* LCOV_EXCL_LINE */
                                }
                        }
 
@@ -722,18 +695,18 @@ int _dbus_start_service(service_plugin_h plugin,
        g_variant_builder_unref(builder_in);
 
        if (NULL == call_result) {
-               error->code = SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE;
-               ret = SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE;
+               error->code = SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE; /* LCOV_EXCL_LINE */
+               ret = SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE; /* LCOV_EXCL_LINE */
 
-               if (NULL != g_error) {
-                       error->msg = __SAFE_STRDUP(g_error->message);
-                       g_error_free(g_error);
+               if (NULL != g_error) { /* LCOV_EXCL_LINE */
+                       error->msg = __SAFE_STRDUP(g_error->message); /* LCOV_EXCL_LINE */
+                       g_error_free(g_error); /* LCOV_EXCL_LINE */
                }
        } else {
                if (FALSE == g_variant_is_of_type(call_result, G_VARIANT_TYPE("(ts)"))) {
-                       error->code = SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE;
-                       error->msg = strdup("D-Bus return type error");
-                       ret = SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE;
+                       error->code = SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE; /* LCOV_EXCL_LINE */
+                       error->msg = strdup("D-Bus return type error"); /* LCOV_EXCL_LINE */
+                       ret = SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE; /* LCOV_EXCL_LINE */
                } else {
                        GVariant *call_result_struct[2];
                        call_result_struct[0] = g_variant_get_child_value(call_result, 0);
@@ -742,9 +715,9 @@ int _dbus_start_service(service_plugin_h plugin,
                        uint64_t remote_call_result = g_variant_get_uint64(call_result_struct[0]);
 
                        if (SERVICE_ADAPTOR_ERROR_NONE != remote_call_result) {
-                               error->code = remote_call_result;
-                               error->msg = ipc_g_variant_dup_string(call_result_struct[1]);
-                               ret = SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE;
+                               error->code = remote_call_result; /* LCOV_EXCL_LINE */
+                               error->msg = ipc_g_variant_dup_string(call_result_struct[1]); /* LCOV_EXCL_LINE */
+                               ret = SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE; /* LCOV_EXCL_LINE */
                        }
 
                        g_variant_unref(call_result_struct[0]);
@@ -757,7 +730,7 @@ int _dbus_start_service(service_plugin_h plugin,
        return ret;
 }
 
-//LCOV_EXCL_START
+/* LCOV_EXCL_START */
 static void *_on_dbus_disappeared_cb(void *data)
 {
        FUNC_START();
@@ -794,4 +767,4 @@ static void *_on_dbus_disappeared_cb(void *data)
        FUNC_END();
        return NULL;
 }
-//LCOV_EXCL_STOP
+/* LCOV_EXCL_STOP */
index 6c04a9e7b6a81ac1008b77cfef1eb7acfca63ac0..6b2a1d4b4ab56a3797f893acf7d6c038d999af03 100644 (file)
@@ -30,8 +30,8 @@ int _dbus_client_layer_init()
        int ret = _dbus_client_service_adaptor_init();
 
        if (0 != ret) {
-               _dbus_client_service_adaptor_deinit();
-               return ret;
+               _dbus_client_service_adaptor_deinit(); /* LCOV_EXCL_LINE */
+               return ret; /* LCOV_EXCL_LINE */
        }
 
        return 0;
index 6a835254fe15f2c31d869d7d5ee65f6df198516e..8c2ac6327a24b1430f7f67247849e355b3561061 100644 (file)
@@ -135,12 +135,12 @@ void __get_file_info_s_type(GVariant *call_result_struct,
        int idx1 = 0, idx2 = 0, idx3 = 0;
        _file_info = service_storage_create_file_info();
        if (NULL == _file_info) {
-               *file_info = NULL;
+               *file_info = NULL; /* LCOV_EXCL_LINE */
 
-               for (size_t j = 0; j < service_adaptor_file_info_s_type_length; j++) {
-                       g_variant_unref(res_info_struct[j]);
+               for (size_t j = 0; j < service_adaptor_file_info_s_type_length; j++) { /* LCOV_EXCL_LINE */
+                       g_variant_unref(res_info_struct[j]); /* LCOV_EXCL_LINE */
                }
-               return;
+               return; /* LCOV_EXCL_LINE */
        }
 
        _file_info->plugin_name                 = ipc_g_variant_dup_string(res_info_struct[idx1++]);
@@ -235,7 +235,7 @@ void __get_get_file_list_res_type(GVariant *in_parameters,
                idx++;
                *file_info_list_len = g_variant_get_uint32(res_info_struct[idx++]);
        } else {
-               *file_info_list_len = 0U;
+               *file_info_list_len = 0U; /* LCOV_EXCL_LINE */
        }
 
        for (size_t j = 0; j < service_adaptor_get_file_list_res_s_type_length; j++) {
@@ -281,17 +281,17 @@ void on_storage_signal(GDBusProxy *proxy,
                service_adaptor_task_h task = _queue_get_task(file_uid);
 
                if (NULL == task) {
-                       sac_warning("Callback task get failed");
-                       return;
+                       sac_warning("Callback task get failed"); /* LCOV_EXCL_LINE */
+                       return; /* LCOV_EXCL_LINE */
                } else if (NULL == task->handle) {
-                       sac_warning("Callback task->handle get failed");
-                       return;
+                       sac_warning("Callback task->handle get failed"); /* LCOV_EXCL_LINE */
+                       return; /* LCOV_EXCL_LINE */
                } else {
                        service_storage_task_h storage_task = (service_storage_task_h) task->handle;
 
                        if (NULL != storage_task->progress_callback) {
-                               sac_debug("Call progress callback[%lld] (%llu/%llu byte)", file_uid, progress_size, total_size);
-                               storage_task->progress_callback(progress_size, total_size, storage_task->progress_user_data);
+                               sac_debug("Call progress callback[%lld] (%llu/%llu byte)", file_uid, progress_size, total_size); /* LCOV_EXCL_LINE */
+                               storage_task->progress_callback(progress_size, total_size, storage_task->progress_user_data); /* LCOV_EXCL_LINE */
                        }
                }
        } else if (0 == g_strcmp0(signal_name, DBUS_STORAGE_FILE_TRANSFER_STATE_CHANGED_SIGNAL)) {
@@ -313,10 +313,10 @@ void on_storage_signal(GDBusProxy *proxy,
                        _state = SERVICE_STORAGE_TASK_CANCELED;
                        break;
                case SERVICE_ADAPTOR_FILE_TRANSFER_STATE_FAILED:
-                       _state = SERVICE_STORAGE_TASK_FAILED;
-                       break;
+                       _state = SERVICE_STORAGE_TASK_FAILED; /* LCOV_EXCL_LINE */
+                       break; /* LCOV_EXCL_LINE */
                default:
-                       return;
+                       return; /* LCOV_EXCL_LINE */
                }
 
                GVariant *call_result[2];
@@ -331,17 +331,17 @@ void on_storage_signal(GDBusProxy *proxy,
                service_adaptor_task_h task = _queue_get_task(file_uid);
 
                if (NULL == task) {
-                       sac_warning("Callback task get failed");
-                       return;
+                       sac_warning("Callback task get failed"); /* LCOV_EXCL_LINE */
+                       return; /* LCOV_EXCL_LINE */
                } else if (NULL == task->handle) {
-                       sac_warning("Callback task->handle get failed");
-                       return;
+                       sac_warning("Callback task->handle get failed"); /* LCOV_EXCL_LINE */
+                       return; /* LCOV_EXCL_LINE */
                } else {
                        service_storage_task_h storage_task = (service_storage_task_h) task->handle;
 
                        if (NULL != storage_task->state_callback) {
-                               sac_debug("Call state callback[%lld] (%d state)", file_uid, _state);
-                               storage_task->state_callback(_state, storage_task->state_user_data);
+                               sac_debug("Call state callback[%lld] (%d state)", file_uid, _state); /* LCOV_EXCL_LINE */
+                               storage_task->state_callback(_state, storage_task->state_user_data); /* LCOV_EXCL_LINE */
                        }
                }
        }
@@ -682,9 +682,9 @@ int _dbus_get_privilege_check_result(const char *service_name,
        ipc_check_proxy(sac_interface_proxy);
 
        if ((NULL == service_name) || (NULL == privilege_name)) {
-               error->code = SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER;
-               error->msg = strdup("Invalid Param");
-               return SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER;
+               error->code = SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER; /* LCOV_EXCL_LINE */
+               error->msg = strdup("Invalid Param"); /* LCOV_EXCL_LINE */
+               return SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER; /* LCOV_EXCL_LINE */
        }
 
        GVariant *request = g_variant_new("(" private_service_adaptor_privilege_check_req_s_type ")", __safe_add_string(service_name), __safe_add_string(privilege_name));
index 63bfd96bc1cc3d2c5dd9372593549aa97e38d7cc..422dce6774954f1214facca435deaebd6cab6f0e 100644 (file)
@@ -108,10 +108,10 @@ int _queue_add_task(int64_t _id,
        service_adaptor_task_h task = (service_adaptor_task_h) g_malloc0(sizeof(service_adaptor_task_s));
 
        if (NULL == task) {
-               // LCOV_EXCL_START
+               /* LCOV_EXCL_START */
                FUNC_STOP();
                return -1;
-               // LCOV_EXCL_STOP
+               /* LCOV_EXCL_STOP */
        }
 
        task->id = _id;
@@ -188,37 +188,7 @@ void _queue_clear_task()
        g_service_adaptor_task_queue = NULL;
 }
 
-/**     @brief  Adds Task in Queue
- *      @return int
- *      @remarks :
- */
- /*
-int _signal_queue_add_task(int64_t _id,
-                                               uint32_t _callback,
-                                               void *_handle,
-                                               void *user_data)
-{
-       FUNC_START();
-
-       service_adaptor_task_h task = (service_adaptor_task_h) g_malloc0(sizeof(service_adaptor_task_s));
-
-       if (NULL == task) {
-               FUNC_STOP();
-               return -1;
-       }
-
-       task->id = _id;
-       task->callback = _callback;
-       task->handle = _handle;
-       task->user_data = user_data;
-
-       g_service_adaptor_signal_queue = g_list_append(g_service_adaptor_signal_queue, task);
-
-       FUNC_END();
-       return 0;
-}
-*/
-
+/* LCOV_EXCL_START */
 /**     @brief  Adds Task in Queue
  *      @return service_adaptor_task_h
  *      @remarks :
@@ -240,36 +210,7 @@ service_adaptor_task_h _signal_queue_get_task(int64_t _id)
        FUNC_END();
        return target;
 }
-
-/**     @brief  Adds Task in Queue
- *      @return int
- *      @remarks :
- */
- /*
-int _signal_queue_del_task(service_adaptor_task_h _task)
-{
-       FUNC_START();
-       service_adaptor_task_h target = NULL;
-
-       for (GList *list = g_list_first(g_service_adaptor_signal_queue); list != NULL; list = g_list_next(list)) {
-               service_adaptor_task_h data = (service_adaptor_task_h) list->data;
-
-               if ((NULL != data) && (_task == data)) {
-                       target = data;
-                       break;
-               }
-       }
-
-       if (NULL != target) {
-               g_service_adaptor_signal_queue = g_list_remove(g_service_adaptor_signal_queue, target);
-               g_free(target);
-               target = NULL;
-       }
-
-       FUNC_END();
-       return 0;
-}
-*/
+/* LCOV_EXCL_STOP */
 
 /**     @brief  Clears Task in Queue
  *      @return void
@@ -279,27 +220,12 @@ void _signal_queue_clear_task()
 {
        FUNC_START();
        if (NULL != g_service_adaptor_signal_queue) {
-               g_list_free(g_service_adaptor_signal_queue);
+               g_list_free(g_service_adaptor_signal_queue); /* LCOV_EXCL_LINE */
        }
        g_service_adaptor_signal_queue = NULL;
        FUNC_END();
 }
 
-/*
-int service_adaptor_check_handle_validate(service_adaptor_h handle)
-{
-       if ((NULL == handle) || (NULL == g_service_adaptor)) {
-               sac_error("The handle is invalid <user(%p) adaptor(%p)>", handle, g_service_adaptor);
-               return -1;
-       } else if (handle != g_service_adaptor) {
-               sac_error("The handle is invalid <user(%p) adaptor(%p)>", handle, g_service_adaptor);
-               return -2;
-       } else {
-               return 0;
-       }
-}
-*/
-
 void _service_adaptor_set_last_result(int code, const char *message)
 {
        FUNC_START();
@@ -337,8 +263,8 @@ int service_adaptor_get_last_error_message(char **message)
        } else if (0 >= strlen(last_error_message)) {
                ret = SERVICE_ADAPTOR_ERROR_NO_DATA;
        } else {
-               *message = strdup(last_error_message);
-               ret = SERVICE_ADAPTOR_ERROR_NONE;
+               *message = strdup(last_error_message); /* LCOV_EXCL_LINE */
+               ret = SERVICE_ADAPTOR_ERROR_NONE; /* LCOV_EXCL_LINE */
        }
 
        FUNC_END();
@@ -368,31 +294,18 @@ int service_adaptor_create(service_adaptor_h *handle)
        }
 
        if (0 < connections_counter) {
-               g_mutex_unlock(&connections_counter_mutex);
-
-               return SERVICE_ADAPTOR_ERROR_NOT_SUPPORTED;
+               g_mutex_unlock(&connections_counter_mutex); /* LCOV_EXCL_LINE */
+               return SERVICE_ADAPTOR_ERROR_NOT_SUPPORTED; /* LCOV_EXCL_LINE */
        }
 
        service = (service_adaptor_h) calloc(1, sizeof(service_adaptor_s));
 
        if (NULL == service) {
-               service_adaptor_set_last_result(SERVICE_ADAPTOR_ERROR_UNKNOWN, "Memory allocation failed");
-               g_mutex_unlock(&connections_counter_mutex);
-               return SERVICE_ADAPTOR_ERROR_UNKNOWN;
+               service_adaptor_set_last_result(SERVICE_ADAPTOR_ERROR_UNKNOWN, "Memory allocation failed"); /* LCOV_EXCL_LINE */
+               g_mutex_unlock(&connections_counter_mutex); /* LCOV_EXCL_LINE */
+               return SERVICE_ADAPTOR_ERROR_UNKNOWN; /* LCOV_EXCL_LINE */
        }
-/*
-       int trd = 0;
-       char fingerprint[50] = {0, };
-       snprintf(fingerprint, 50, "%s/%d", SERVICE_ADAPTOR_START_KEY_PATH, getpid());
-       sac_debug("Trigger open : %s", fingerprint);
-       trd = open(fingerprint, O_WRONLY|O_CREAT, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
-       if (0 > trd) {
-               sac_error("Trigger open failed (%d)", trd);
-               free(service);
-               g_mutex_unlock(&connections_counter_mutex);
-               return SERVICE_ADAPTOR_ERROR_INVALID_STATE;
-       }
-*/
+
        int dbus_ret = _dbus_client_layer_init();
 
        if (0 == dbus_ret) {
@@ -405,28 +318,18 @@ int service_adaptor_create(service_adaptor_h *handle)
        ret = _dbus_connect_service_adaptor(&error);
 
        if (SERVICE_ADAPTOR_ERROR_NONE != ret) {
-               service_adaptor_set_last_result(error.code, error.msg);
-               free(service);
-/*
-               close(trd);
-               remove(fingerprint);
-*/
-               g_mutex_unlock(&connections_counter_mutex);
-               free(error.msg);
-               return ret;
+               service_adaptor_set_last_result(error.code, error.msg); /* LCOV_EXCL_LINE */
+               free(service); /* LCOV_EXCL_LINE */
+               g_mutex_unlock(&connections_counter_mutex); /* LCOV_EXCL_LINE */
+               free(error.msg); /* LCOV_EXCL_LINE */
+               return ret; /* LCOV_EXCL_LINE */
        }
 
        service->on_signal = NULL;
 
-/*     service->plugins = NULL; */
-/*     service->plugin_count = 0; */
-
        *handle = service;
        g_service_adaptor = service;
-/*
-       close(trd);
-       remove(fingerprint);
-*/
+
        g_mutex_unlock(&connections_counter_mutex);
 
        sac_api_end(ret);
@@ -450,12 +353,12 @@ int service_adaptor_destroy(service_adaptor_h handle)
        g_mutex_lock(&connections_counter_mutex);
 
        if (0 >= connections_counter) {
-               connections_counter = 0;
-               g_service_adaptor = NULL;
-               g_mutex_unlock(&connections_counter_mutex);
+               connections_counter = 0; /* LCOV_EXCL_LINE */
+               g_service_adaptor = NULL; /* LCOV_EXCL_LINE */
+               g_mutex_unlock(&connections_counter_mutex); /* LCOV_EXCL_LINE */
 
-               ret = SERVICE_ADAPTOR_ERROR_UNKNOWN;
-               return ret;
+               ret = SERVICE_ADAPTOR_ERROR_UNKNOWN; /* LCOV_EXCL_LINE */
+               return ret; /* LCOV_EXCL_LINE */
        }
 
        if (NULL != handle) {
@@ -496,8 +399,8 @@ int service_adaptor_foreach_plugin(service_adaptor_h handle,
        ret = _dbus_get_plugin_list(&plugin_uris, &plugins_len, &error);
 
        if (SERVICE_ADAPTOR_ERROR_NONE != ret) {
-               service_adaptor_set_last_result(error.code, error.msg);
-               free(error.msg);
+               service_adaptor_set_last_result(error.code, error.msg); /* LCOV_EXCL_LINE */
+               free(error.msg); /* LCOV_EXCL_LINE */
        } else if ((NULL != plugin_uris) && (0 < plugins_len)) {
                int i;
                bool is_continue = true;
@@ -539,10 +442,10 @@ int service_adaptor_create_plugin(service_adaptor_h handle,
 
                        *plugin = _plugin;
                } else {
-                       free(_plugin);
-                       free(_plugin_uri);
-                       sac_error("Critical : Memory allocation failed.");
-                       ret = SERVICE_ADAPTOR_ERROR_UNKNOWN;
+                       free(_plugin); /* LCOV_EXCL_LINE */
+                       free(_plugin_uri); /* LCOV_EXCL_LINE */
+                       sac_error("Critical : Memory allocation failed."); /* LCOV_EXCL_LINE */
+                       ret = SERVICE_ADAPTOR_ERROR_UNKNOWN; /* LCOV_EXCL_LINE */
                }
        }
 
@@ -627,22 +530,6 @@ int service_plugin_get_property(service_plugin_h handle,
        } else {
                *value = strdup((char *) property);
        }
-/*
-       GHashTableIter iter;
-       gpointer iter_key;
-       gpointer iter_value;
-       g_hash_table_iter_init(&iter, (GHashTable *)(handle->optional_property));
-       while (g_hash_table_iter_next(&iter, &iter_key, &iter_value)) {
-               if (NULL != iter_key) {
-                       if (0 == strcmp((char *)iter_key, key)) {
-                               ret = SERVICE_ADAPTOR_ERROR_NONE;
-                               *value = strdup((char *)iter_value);
-                               break;
-                       }
-               }
-       }
-*/
-
        sac_api_end(ret);
        return ret;
 }
@@ -666,20 +553,20 @@ int service_plugin_start(service_plugin_h handle,
        app_ret = app_get_id(&tizen_app_id);
 
        if (app_ret || (NULL == tizen_app_id)) {
-               char executable_path[1000];
-               int executable_path_len = 0;
-               executable_path_len = readlink("/proc/self/exe", executable_path, 1000);
-               tizen_app_id = strndup(executable_path, executable_path_len);
-               type = strdup("etc");
-               handle->app_type = CLIENT_APP_TYPE_ETC;
+               char executable_path[1000]; /* LCOV_EXCL_LINE */
+               int executable_path_len = 0; /* LCOV_EXCL_LINE */
+               executable_path_len = readlink("/proc/self/exe", executable_path, 1000); /* LCOV_EXCL_LINE */
+               tizen_app_id = strndup(executable_path, executable_path_len); /* LCOV_EXCL_LINE */
+               type = strdup("etc"); /* LCOV_EXCL_LINE */
+               handle->app_type = CLIENT_APP_TYPE_ETC; /* LCOV_EXCL_LINE */
        } else {
                type = strdup("app");
                handle->app_type = CLIENT_APP_TYPE_APPLICATION;
        }
 
        if (NULL == tizen_app_id) {
-               free(type);
-               return SERVICE_ADAPTOR_ERROR_UNKNOWN;
+               free(type); /* LCOV_EXCL_LINE */
+               return SERVICE_ADAPTOR_ERROR_UNKNOWN; /* LCOV_EXCL_LINE */
        }
 
        service_handle_name = g_strconcat(tizen_app_id, "?type=", type, "&plugin=", handle->plugin_uri, NULL);
@@ -688,24 +575,13 @@ int service_plugin_start(service_plugin_h handle,
        free(type);
 
        if (NULL == service_handle_name) {
-               sac_error("handle name get failed");
-               service_adaptor_set_last_result(SERVICE_ADAPTOR_ERROR_UNKNOWN, "handle name get failed");
-               return SERVICE_ADAPTOR_ERROR_UNKNOWN;
+               sac_error("handle name get failed"); /* LCOV_EXCL_LINE */
+               service_adaptor_set_last_result(SERVICE_ADAPTOR_ERROR_UNKNOWN, "handle name get failed"); /* LCOV_EXCL_LINE */
+               return SERVICE_ADAPTOR_ERROR_UNKNOWN; /* LCOV_EXCL_LINE */
        }
 
        /* TODO replace to real cookie */
        snprintf(security_cookie, SECURITY_SERVER_COOKIE_BUFFER_SIZE, "%020d", (int)getpid());
-/*
-       int sec_ret = security_server_request_cookie(security_cookie, SECURITY_SERVER_COOKIE_BUFFER_SIZE);
-       sac_debug_func("security_cookie : %s (%d)", security_cookie, sec_ret);
-
-       if (('\0' == security_cookie[0]) || sec_ret) {
-               sac_error("cookie get failed");
-               service_adaptor_set_last_result(SERVICE_ADAPTOR_ERROR_UNKNOWN, "security cookie get failed");
-               free(service_handle_name);
-               return SERVICE_ADAPTOR_ERROR_UNKNOWN;
-       }
-*/
 
        handle->service_handle_name = service_handle_name;
        sac_info("handle name :%s", handle->service_handle_name);
@@ -717,8 +593,8 @@ int service_plugin_start(service_plugin_h handle,
        ret = _dbus_start_service(handle, service_flag, security_cookie, &error);
 
        if (SERVICE_ADAPTOR_ERROR_NONE != ret) {
-               service_adaptor_set_last_result(error.code, error.msg);
-               free(error.msg);
+               service_adaptor_set_last_result(error.code, error.msg); /* LCOV_EXCL_LINE */
+               free(error.msg); /* LCOV_EXCL_LINE */
        }
 
        sac_api_end(ret);
index 262390490a994d1b199e67b111f3b258bed30498..2f288267e4ff1c17b9c67d5c6c793044e6a7b949 100644 (file)
@@ -74,12 +74,12 @@ service_storage_file_h service_storage_create_file_info(void)
        _cloud_meta = (service_storage_cloud_meta_s *) calloc(1, sizeof(service_storage_cloud_meta_s));
 
        if ((NULL == _file_info) || (NULL == _media_meta) || (NULL == _cloud_meta)) {
-               free(_file_info);
-               free(_media_meta);
-               free(_cloud_meta);
+               free(_file_info); /* LCOV_EXCL_LINE */
+               free(_media_meta); /* LCOV_EXCL_LINE */
+               free(_cloud_meta); /* LCOV_EXCL_LINE */
 
-               FUNC_STOP();
-               return NULL;
+               FUNC_STOP(); /* LCOV_EXCL_LINE */
+               return NULL; /* LCOV_EXCL_LINE */
        }
 
        _media_meta->mime_type          = NULL;
@@ -133,13 +133,13 @@ int service_storage_unref_file_info(service_storage_file_h *file_info)
 {
        FUNC_START();
        if (NULL == file_info) {
-               FUNC_STOP();
-               return 1;
+               FUNC_STOP(); /* LCOV_EXCL_LINE */
+               return 1; /* LCOV_EXCL_LINE */
        }
 
        if (NULL == *file_info) {
-               FUNC_STOP();
-               return 0;
+               FUNC_STOP(); /* LCOV_EXCL_LINE */
+               return 0; /* LCOV_EXCL_LINE */
        }
        service_storage_file_h _file_info = *file_info;
 
@@ -207,25 +207,25 @@ int service_storage_create_upload_task(service_plugin_h plugin,
                int privilege_ret = 0;
                privilege_ret = _dbus_get_privilege_check_result(plugin->service_handle_name, TIZEN_PRIVILEGE_NAME_INTERNET, NULL, &error);
                if (SERVICE_ADAPTOR_ERROR_NONE != privilege_ret) {
-                       sac_error("Privilege check error (ret : %d)", privilege_ret);
-                       return SERVICE_ADAPTOR_ERROR_PERMISSION_DENIED;
+                       sac_error("Privilege check error (ret : %d)", privilege_ret); /* LCOV_EXCL_LINE */
+                       return SERVICE_ADAPTOR_ERROR_PERMISSION_DENIED; /* LCOV_EXCL_LINE */
                }
        }
 
        service_storage_task_h _task = (service_storage_task_h) calloc(1, sizeof(service_storage_task_t));
        if (NULL == _task) {
-               ret = SERVICE_ADAPTOR_ERROR_UNKNOWN;
-               service_adaptor_set_last_result(ret, "Memory allocation failed");
-               return ret;
+               ret = SERVICE_ADAPTOR_ERROR_UNKNOWN; /* LCOV_EXCL_LINE */
+               service_adaptor_set_last_result(ret, "Memory allocation failed"); /* LCOV_EXCL_LINE */
+               return ret; /* LCOV_EXCL_LINE */
        }
 
        long long int task_id = 0;
        ret = _dbus_open_upload_file(plugin->service_handle_name, file_path, upload_path, &task_id, &error);
 
        if (SERVICE_ADAPTOR_ERROR_NONE != ret) {
-               service_adaptor_set_last_result(error.code, error.msg);
-               free(error.msg);
-               free(_task);
+               service_adaptor_set_last_result(error.code, error.msg); /* LCOV_EXCL_LINE */
+               free(error.msg); /* LCOV_EXCL_LINE */
+               free(_task); /* LCOV_EXCL_LINE */
        } else {
                _task->service_handle_name = strdup(plugin->service_handle_name);
                _task->task_id = task_id;
@@ -279,25 +279,25 @@ int service_storage_create_download_task(service_plugin_h plugin,
                int privilege_ret = 0;
                privilege_ret = _dbus_get_privilege_check_result(plugin->service_handle_name, TIZEN_PRIVILEGE_NAME_INTERNET, NULL, &error);
                if (SERVICE_ADAPTOR_ERROR_NONE != privilege_ret) {
-                       sac_error("Privilege check error (ret : %d)", privilege_ret);
-                       return SERVICE_ADAPTOR_ERROR_PERMISSION_DENIED;
+                       sac_error("Privilege check error (ret : %d)", privilege_ret); /* LCOV_EXCL_LINE */
+                       return SERVICE_ADAPTOR_ERROR_PERMISSION_DENIED; /* LCOV_EXCL_LINE */
                }
        }
 
        service_storage_task_h _task = (service_storage_task_h) calloc(1, sizeof(service_storage_task_t));
        if (NULL == _task) {
-               ret = SERVICE_ADAPTOR_ERROR_UNKNOWN;
-               service_adaptor_set_last_result(ret, "Memory allocation failed");
-               return ret;
+               ret = SERVICE_ADAPTOR_ERROR_UNKNOWN; /* LCOV_EXCL_LINE */
+               service_adaptor_set_last_result(ret, "Memory allocation failed"); /* LCOV_EXCL_LINE */
+               return ret; /* LCOV_EXCL_LINE */
        }
 
        long long int task_id = 0;
        ret = _dbus_open_download_file(plugin->service_handle_name, storage_path, download_path, &task_id, &error);
 
        if (SERVICE_ADAPTOR_ERROR_NONE != ret) {
-               service_adaptor_set_last_result(error.code, error.msg);
-               free(error.msg);
-               free(_task);
+               service_adaptor_set_last_result(error.code, error.msg); /* LCOV_EXCL_LINE */
+               free(error.msg); /* LCOV_EXCL_LINE */
+               free(_task); /* LCOV_EXCL_LINE */
        } else {
                _task->service_handle_name = strdup(plugin->service_handle_name);
                _task->task_id = task_id;
@@ -350,29 +350,29 @@ int service_storage_create_download_thumbnail_task(service_plugin_h plugin,
                int privilege_ret = 0;
                privilege_ret = _dbus_get_privilege_check_result(plugin->service_handle_name, TIZEN_PRIVILEGE_NAME_INTERNET, NULL, &error);
                if (SERVICE_ADAPTOR_ERROR_NONE != privilege_ret) {
-                       sac_error("Privilege check error (ret : %d)", privilege_ret);
-                       return SERVICE_ADAPTOR_ERROR_PERMISSION_DENIED;
+                       sac_error("Privilege check error (ret : %d)", privilege_ret); /* LCOV_EXCL_LINE */
+                       return SERVICE_ADAPTOR_ERROR_PERMISSION_DENIED; /* LCOV_EXCL_LINE */
                }
        }
 
        service_storage_task_h _task = (service_storage_task_h) calloc(1, sizeof(service_storage_task_t));
        int *t_size = (int *)calloc(1, sizeof(int));
        if ((NULL == _task) || (NULL == t_size)) {
-               ret = SERVICE_ADAPTOR_ERROR_UNKNOWN;
-               service_adaptor_set_last_result(ret, "Memory allocation failed");
-               free(_task);
-               free(t_size);
-               return ret;
+               ret = SERVICE_ADAPTOR_ERROR_UNKNOWN; /* LCOV_EXCL_LINE */
+               service_adaptor_set_last_result(ret, "Memory allocation failed"); /* LCOV_EXCL_LINE */
+               free(_task); /* LCOV_EXCL_LINE */
+               free(t_size); /* LCOV_EXCL_LINE */
+               return ret; /* LCOV_EXCL_LINE */
        }
 
        long long int task_id = 0;
        ret = _dbus_open_download_thumbnail(plugin->service_handle_name, storage_path, download_path, thumbnail_size, &task_id, &error);
 
        if (SERVICE_ADAPTOR_ERROR_NONE != ret) {
-               service_adaptor_set_last_result(error.code, error.msg);
-               free(error.msg);
-               free(_task);
-               free(t_size);
+               service_adaptor_set_last_result(error.code, error.msg); /* LCOV_EXCL_LINE */
+               free(error.msg); /* LCOV_EXCL_LINE */
+               free(_task); /* LCOV_EXCL_LINE */
+               free(t_size); /* LCOV_EXCL_LINE */
        } else {
                _task->service_handle_name = strdup(plugin->service_handle_name);
                _task->task_id = task_id;
@@ -417,8 +417,8 @@ int service_storage_destroy_task(service_storage_task_h task)
        ret = _dbus_close_file_task(task->service_handle_name, task->task_id, &error);
 
        if (SERVICE_ADAPTOR_ERROR_NONE != ret) {
-               service_adaptor_set_last_result(error.code, error.msg);
-               free(error.msg);
+               service_adaptor_set_last_result(error.code, error.msg); /* LCOV_EXCL_LINE */
+               free(error.msg); /* LCOV_EXCL_LINE */
        }
 
        service_adaptor_task_h callback_task = NULL;
@@ -471,16 +471,16 @@ int service_storage_start_task(service_storage_task_h task)
        break;
 
        default:
-               sac_info("Invalid async task");
-               ret = SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER;
-               error.code = SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER;
-               error.msg = strdup("Invalid async task operation");
-       break;
+               sac_info("Invalid async task"); /* LCOV_EXCL_LINE */
+               ret = SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER; /* LCOV_EXCL_LINE */
+               error.code = SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER; /* LCOV_EXCL_LINE */
+               error.msg = strdup("Invalid async task operation"); /* LCOV_EXCL_LINE */
+               break; /* LCOV_EXCL_LINE */
        }
 
        if (SERVICE_ADAPTOR_ERROR_NONE != ret) {
-               service_adaptor_set_last_result(error.code, error.msg);
-               free(error.msg);
+               service_adaptor_set_last_result(error.code, error.msg); /* LCOV_EXCL_LINE */
+               free(error.msg); /* LCOV_EXCL_LINE */
        }
 
        sac_api_end(ret);
@@ -518,16 +518,16 @@ int service_storage_cancel_task(service_storage_task_h task)
        break;
 
        default:
-               sac_info("Invalid async task");
-               ret = SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER;
-               error.code = SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER;
-               error.msg = strdup("Invalid async task operation");
-       break;
+               sac_info("Invalid async task"); /* LCOV_EXCL_LINE */
+               ret = SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER; /* LCOV_EXCL_LINE */
+               error.code = SERVICE_ADAPTOR_ERROR_INVALID_PARAMETER; /* LCOV_EXCL_LINE */
+               error.msg = strdup("Invalid async task operation"); /* LCOV_EXCL_LINE */
+               break; /* LCOV_EXCL_LINE */
        }
 
        if (SERVICE_ADAPTOR_ERROR_NONE != ret) {
-               service_adaptor_set_last_result(error.code, error.msg);
-               free(error.msg);
+               service_adaptor_set_last_result(error.code, error.msg); /* LCOV_EXCL_LINE */
+               free(error.msg); /* LCOV_EXCL_LINE */
        }
 
        sac_api_end(ret);
@@ -630,21 +630,21 @@ void *_get_file_list_runnable(void *_data)
        ret = _dbus_get_file_list(_params->plugin->service_handle_name, _params->path, &files, &files_len, NULL, &error);
 
        if (SERVICE_ADAPTOR_ERROR_NONE != ret) {
-               service_adaptor_set_last_result(error.code, error.msg);
-               free(error.msg);
-               if ((NULL != files) && (0 < files_len)) {
-                       int i;
-                       for (i = 0; i < files_len; i++) {
-                               service_storage_unref_file_info(&files[i]);
-                       }
-                       free(files);
-                       files = NULL;
+               service_adaptor_set_last_result(error.code, error.msg); /* LCOV_EXCL_LINE */
+               free(error.msg); /* LCOV_EXCL_LINE */
+               if ((NULL != files) && (0 < files_len)) { /* LCOV_EXCL_LINE */
+                       int i; /* LCOV_EXCL_LINE */
+                       for (i = 0; i < files_len; i++) { /* LCOV_EXCL_LINE */
+                               service_storage_unref_file_info(&files[i]); /* LCOV_EXCL_LINE */
+                       } /* LCOV_EXCL_LINE */
+                       free(files); /* LCOV_EXCL_LINE */
+                       files = NULL; /* LCOV_EXCL_LINE */
                }
        } else {
                if (0 < files_len) {
                        file_list = (service_storage_file_list_h) calloc(1, sizeof(struct _service_storage_file_list_s));
                        if (NULL == file_list) {
-                               sac_error("Critical : Memory allocation failed");
+                               sac_error("Critical : Memory allocation failed"); /* LCOV_EXCL_LINE */
                                ret = SERVICE_ADAPTOR_ERROR_UNKNOWN;
                        } else {
                                file_list->list = files;
@@ -694,8 +694,8 @@ int service_storage_get_file_list(service_plugin_h plugin,
                error.msg = NULL;
                privilege_ret = _dbus_get_privilege_check_result(plugin->service_handle_name, TIZEN_PRIVILEGE_NAME_INTERNET, NULL, &error);
                if (SERVICE_ADAPTOR_ERROR_NONE != privilege_ret) {
-                       sac_error("Privilege check error (ret : %d)", privilege_ret);
-                       return SERVICE_ADAPTOR_ERROR_PERMISSION_DENIED;
+                       sac_error("Privilege check error (ret : %d)", privilege_ret); /* LCOV_EXCL_LINE */
+                       return SERVICE_ADAPTOR_ERROR_PERMISSION_DENIED; /* LCOV_EXCL_LINE */
                }
        }
 
@@ -703,8 +703,8 @@ int service_storage_get_file_list(service_plugin_h plugin,
        params = (struct __async_wrapper_context *) calloc(1, sizeof(struct __async_wrapper_context));
 
        if (NULL == params) {
-               sac_warning("Memory allocation failed");
-               ret = SERVICE_ADAPTOR_ERROR_UNKNOWN;
+               sac_warning("Memory allocation failed"); /* LCOV_EXCL_LINE */
+               ret = SERVICE_ADAPTOR_ERROR_UNKNOWN; /* LCOV_EXCL_LINE */
        } else {
                params->plugin = plugin;
                params->path = strdup(dir_path);
@@ -716,10 +716,10 @@ int service_storage_get_file_list(service_plugin_h plugin,
                thread_ret = pthread_create(&get_list_thread, NULL, _get_file_list_runnable, (void *)params);
 
                if (thread_ret) {
-                       sac_warning("Thread create failed");
-                       ret = SERVICE_ADAPTOR_ERROR_UNKNOWN;
-                       free(params->path);
-                       free(params);
+                       sac_warning("Thread create failed"); /* LCOV_EXCL_LINE */
+                       ret = SERVICE_ADAPTOR_ERROR_UNKNOWN; /* LCOV_EXCL_LINE */
+                       free(params->path); /* LCOV_EXCL_LINE */
+                       free(params); /* LCOV_EXCL_LINE */
                }
        }
 
@@ -740,15 +740,15 @@ int service_storage_file_list_clone(service_storage_file_list_h src_list,
        service_storage_file_list_h _list = NULL;
        _list = (service_storage_file_list_h) calloc(1, sizeof(struct _service_storage_file_list_s));
        if (NULL == _list) {
-               FUNC_STOP();
-               return SERVICE_ADAPTOR_ERROR_UNKNOWN;
+               FUNC_STOP(); /* LCOV_EXCL_LINE */
+               return SERVICE_ADAPTOR_ERROR_UNKNOWN; /* LCOV_EXCL_LINE */
        }
        _list->length = src_list->length;
        _list->list = (service_storage_file_h *) calloc(_list->length, sizeof(struct _service_storage_file_s *));
        if (NULL == _list->list) {
-               free(_list);
-               FUNC_STOP();
-               return SERVICE_ADAPTOR_ERROR_UNKNOWN;
+               free(_list); /* LCOV_EXCL_LINE */
+               FUNC_STOP(); /* LCOV_EXCL_LINE */
+               return SERVICE_ADAPTOR_ERROR_UNKNOWN; /* LCOV_EXCL_LINE */
        }
 
        int i = 0;
@@ -799,8 +799,8 @@ int service_storage_file_clone(service_storage_file_h src_file,
        service_storage_file_h new_file = service_storage_create_file_info();
 
        if (NULL == new_file) {
-               FUNC_STOP();
-               return SERVICE_ADAPTOR_ERROR_UNKNOWN;
+               FUNC_STOP(); /* LCOV_EXCL_LINE */
+               return SERVICE_ADAPTOR_ERROR_UNKNOWN; /* LCOV_EXCL_LINE */
        }
 
        if (NULL != src->media_meta) {
@@ -1023,8 +1023,8 @@ void *_remove_runnable(void *_data)
        ret = _dbus_remove_file(_params->plugin->service_handle_name, _params->path, NULL, &error);
 
        if (SERVICE_ADAPTOR_ERROR_NONE != ret) {
-               service_adaptor_set_last_result(error.code, error.msg);
-               free(error.msg);
+               service_adaptor_set_last_result(error.code, error.msg); /* LCOV_EXCL_LINE */
+               free(error.msg); /* LCOV_EXCL_LINE */
        }
 
        ((service_storage_result_cb)_params->callback)(ret, _params->user_data);
@@ -1061,8 +1061,8 @@ int service_storage_remove(service_plugin_h plugin,
                error.msg = NULL;
                privilege_ret = _dbus_get_privilege_check_result(plugin->service_handle_name, TIZEN_PRIVILEGE_NAME_INTERNET, NULL, &error);
                if (SERVICE_ADAPTOR_ERROR_NONE != privilege_ret) {
-                       sac_error("Privilege check error (ret : %d)", privilege_ret);
-                       return SERVICE_ADAPTOR_ERROR_PERMISSION_DENIED;
+                       sac_error("Privilege check error (ret : %d)", privilege_ret); /* LCOV_EXCL_LINE */
+                       return SERVICE_ADAPTOR_ERROR_PERMISSION_DENIED; /* LCOV_EXCL_LINE */
                }
        }
 
@@ -1070,8 +1070,8 @@ int service_storage_remove(service_plugin_h plugin,
        params = (struct __async_wrapper_context *) calloc(1, sizeof(struct __async_wrapper_context));
 
        if (NULL == params) {
-               sac_warning("Memory allocation failed");
-               ret = SERVICE_ADAPTOR_ERROR_UNKNOWN;
+               sac_warning("Memory allocation failed"); /* LCOV_EXCL_LINE */
+               ret = SERVICE_ADAPTOR_ERROR_UNKNOWN; /* LCOV_EXCL_LINE */
        } else {
                params->plugin = plugin;
                params->path = strdup(remove_path);
@@ -1083,10 +1083,10 @@ int service_storage_remove(service_plugin_h plugin,
                thread_ret = pthread_create(&remove_thread, NULL, _remove_runnable, (void *)params);
 
                if (thread_ret) {
-                       sac_warning("Thread create failed");
-                       ret = SERVICE_ADAPTOR_ERROR_UNKNOWN;
-                       free(params->path);
-                       free(params);
+                       sac_warning("Thread create failed"); /* LCOV_EXCL_LINE */
+                       ret = SERVICE_ADAPTOR_ERROR_UNKNOWN; /* LCOV_EXCL_LINE */
+                       free(params->path); /* LCOV_EXCL_LINE */
+                       free(params); /* LCOV_EXCL_LINE */
                }
        }
 
index e3cac9e2030f26544e15de41c1f23799421b1680..b957991d1869becc746b2962d17eed2e2976301c 100644 (file)
@@ -29,7 +29,7 @@
 
 #include <bundle.h>
 
-// LCOV_EXCL_START
+/* LCOV_EXCL_START */
 /**    @brief  NULL-pointer safe string duplication function
  *             This function will not crash if source string pointer is NULL. It is user's
  *             responsibility to free the result pointer.
@@ -102,32 +102,32 @@ int _get_result_code(long long int error_code)
                return SERVICE_ADAPTOR_ERROR_PLUGIN_FAILED;
        }
 }
-// LCOV_EXCL_STOP
+/* LCOV_EXCL_STOP */
 
 int _ipc_get_simple_result(GVariant *call_result, GError *g_error, service_adaptor_error_s *error)
 {
        int ret = SERVICE_ADAPTOR_ERROR_NONE;
 
        if (NULL == call_result) {
+               /* LCOV_EXCL_START */
                error->code = SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE;
                ret = SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE;
                if (NULL != g_error) {
-                       // LCOV_EXCL_START
                        sac_error("G_IO_ERROR DEBUG (%d)", (int)(g_error->code));
                        if (g_error->code == G_IO_ERROR_TIMED_OUT) {
                                ret = SERVICE_ADAPTOR_ERROR_TIMED_OUT;
                        }
                        error->msg = __SAFE_STRDUP(g_error->message);
                        g_error_free(g_error);
-                       // LCOV_EXCL_STOP
                }
+               /* LCOV_EXCL_STOP */
        } else {
                if (FALSE == g_variant_is_of_type(call_result, G_VARIANT_TYPE("(ts)"))) {
-                       // LCOV_EXCL_START
+                       /* LCOV_EXCL_START */
                        error->code = SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE;
                        error->msg = strdup("D-Bus return type error");
                        ret = SERVICE_ADAPTOR_ERROR_IPC_UNSTABLE;
-                       // LCOV_EXCL_STOP
+                       /* LCOV_EXCL_STOP */
                } else {
                        GVariant *call_result_struct[2];
                        call_result_struct[0] = g_variant_get_child_value(call_result, 0);
@@ -135,11 +135,11 @@ int _ipc_get_simple_result(GVariant *call_result, GError *g_error, service_adapt
 
                        uint64_t remote_call_result = g_variant_get_uint64(call_result_struct[0]);
                        if (SERVICE_ADAPTOR_ERROR_NONE != remote_call_result) {
-                               // LCOV_EXCL_START
+                               /* LCOV_EXCL_START */
                                error->code = remote_call_result;
                                error->msg = ipc_g_variant_dup_string(call_result_struct[1]);
                                ret = _get_result_code(remote_call_result);
-                               // LCOV_EXCL_STOP
+                               /* LCOV_EXCL_STOP */
                        }
                        g_variant_unref(call_result_struct[0]);
                        g_variant_unref(call_result_struct[1]);
index 26797fb5d56042b8f31340898af2fb335c31c476..37d81b4b1dae1a530ab16022fc466c34174d8e40 100644 (file)
@@ -32,7 +32,7 @@
 
 /* if calling completion callback, it need to wait called message api in dbus-message-adaptor */
 
-// LCOV_EXCL_START
+/* LCOV_EXCL_START */
 void _get_service_name_by_message_context(message_adaptor_plugin_context_h context,
                                                char **service_name)
 {
@@ -999,7 +999,7 @@ service_adaptor_internal_error_code_e service_adaptor_message_set_connection(mes
 
        return ret;
 }
-//LCOV_EXCL_STOP
+/* LCOV_EXCL_STOP */
 
 message_adaptor_h service_adaptor_create_message()
 {
index 451b8a66706dc8adaea93459b61cc0dd511909fb..3b5828d1df8069b07458df59946d5ee1020a0dc0 100644 (file)
@@ -329,7 +329,7 @@ static void _remove_push_service_file(const char *service_file)
 /***********************************************************
  * Push adaptor callback
  ***********************************************************/
-//LCOV_EXCL_START
+/* LCOV_EXCL_START */
 void service_adaptor_push_adaptor_on_notification_received(push_adaptor_notification_data_h notification,
                                                void *user_data)
 {
@@ -463,19 +463,6 @@ service_adaptor_internal_error_code_e service_adaptor_connect_push_plugin(servic
                snprintf(ret_msg, 2048, "push plugin connect failed [%d]", (int)__LINE__);
                return SERVICE_ADAPTOR_INTERNAL_ERROR_CREATE;
        }
-/*
-       // Set server info
-       int ret = 0;
-       push_adaptor_error_code_h error = NULL;
-       ret = push_adaptor_set_server_info(plugin, push_context, service->server_info, NULL, &error, NULL);
-       if (SERVICE_ADAPTOR_ERROR_NONE != ret) {
-               service_adaptor_warning("Could not set push plugin server information: %d", ret);
-               if (NULL != error) {
-                       service_adaptor_warning("[%lld] %s", error->code, error->msg);
-               }
-               push_adaptor_destroy_error_code(&error);
-       }
-*/
        push_adaptor_error_code_h error = NULL;
        SERVICE_ADAPTOR_API_TIME_CHECK_PAUSE();
        SERVICE_ADAPTOR_PLUGIN_API_TIME_CHECK_START(SA_TIME_CHECK_FLAG_PUSH);
@@ -573,15 +560,15 @@ service_adaptor_internal_error_code_e service_adaptor_reconnect_push_plugin(serv
        service_adaptor_info("Reconnected push plugin");
        return SERVICE_ADAPTOR_INTERNAL_ERROR_NONE;
 }
-//LCOV_EXCL_STOP
+/* LCOV_EXCL_STOP */
 
 push_adaptor_h service_adaptor_create_push()
 {
        push_adaptor_h push_adaptor = push_adaptor_create(PUSH_PLUGIN_PATH);
 
-       if ((void *) NULL == push_adaptor) { //LCOV_EXCL_LINE
-               service_adaptor_error("Could not create push adaptor"); //LCOV_EXCL_LINE
-               return NULL;
+       if ((void *) NULL == push_adaptor) { /* LCOV_EXCL_LINE */
+               service_adaptor_error("Could not create push adaptor"); /* LCOV_EXCL_LINE */
+               return NULL; /* LCOV_EXCL_LINE */
        }
 
        service_adaptor_debug("Push adaptor created");
@@ -593,6 +580,7 @@ push_adaptor_h service_adaptor_create_push()
        return push_adaptor;
 }
 
+/* LCOV_EXCL_START */
 void service_adaptor_destroy_push(push_adaptor_h push_handle)
 {
        if ((void *) NULL == push_handle) {
@@ -608,21 +596,21 @@ void service_adaptor_destroy_push(push_adaptor_h push_handle)
        _unload_all_push_service_file();
 #endif
 }
-
+/* LCOV_EXCL_STOP */
 
 push_adaptor_listener_h service_adaptor_register_push_listener(push_adaptor_h push_adaptor)
 {
        if ((void *) NULL == push_adaptor) {
-               service_adaptor_error("Could not create push adaptor"); //LCOV_EXCL_LINE
-               return NULL; //LCOV_EXCL_LINE
+               service_adaptor_error("Could not create push adaptor"); /* LCOV_EXCL_LINE */
+               return NULL; /* LCOV_EXCL_LINE */
        }
 
        push_adaptor_listener_h push_listener =
                        (push_adaptor_listener_h) malloc(sizeof(push_adaptor_listener_t));
 
        if ((void *) NULL == push_listener) {
-               service_adaptor_error("Could not create push listener"); //LCOV_EXCL_LINE
-               return NULL; //LCOV_EXCL_LINE
+               service_adaptor_error("Could not create push listener"); /* LCOV_EXCL_LINE */
+               return NULL; /* LCOV_EXCL_LINE */
        }
 
        push_listener->_on_notification_received = service_adaptor_push_adaptor_on_notification_received;
@@ -633,7 +621,7 @@ push_adaptor_listener_h service_adaptor_register_push_listener(push_adaptor_h pu
        return push_listener;
 }
 
-//LCOV_EXCL_START
+/* LCOV_EXCL_START */
 service_adaptor_internal_error_code_e service_adaptor_push_register(const char *service_file, char **error_msg)
 {
        service_adaptor_debug("<Start> %s", __FUNCTION__);
@@ -735,7 +723,7 @@ static void push_data_dbus_activate_callback(const char *app_id,
        }
        service_adaptor_debug("<End> %s", __FUNCTION__);
 }
-//LCOV_EXCL_STOP
+/* LCOV_EXCL_STOP */
 
 service_adaptor_internal_error_code_e service_adaptor_ref_enabled_push_services(push_activate_h **services, int *services_len)
 {
index 39491062c27f146a6fa1502e2e21d3f02917634d..5f6152009f9f65a97aea0239c3acd9021f145b2f 100644 (file)
@@ -103,7 +103,7 @@ service_adaptor_h service_adaptor_get_handle()
        return g_service_adaptor;
 }
 
-//LCOV_EXCL_START
+/* LCOV_EXCL_START */
 void debug_service_context(GList *service_list)
 {
 #ifdef SERVICE_ADAPTOR_DEBUG_CONTEXT
@@ -147,7 +147,7 @@ static void __glog_handler_cb(const gchar *log_domain,
        service_adaptor_error("============================================================");
        service_adaptor_error("============================================================");
 }
-//LCOV_EXCL_STOP
+/* LCOV_EXCL_STOP */
 
 static void glog_handler_init()
 {
@@ -155,7 +155,7 @@ static void glog_handler_init()
                        (int)g_log_set_handler("GLib", G_LOG_LEVEL_CRITICAL, __glog_handler_cb, NULL));
 }
 
-//LCOV_EXCL_START
+/* LCOV_EXCL_START */
 service_adaptor_service_context_h service_adaptor_get_service_context(service_adaptor_h service_adaptor,
                                                const char *service_name)
 {
@@ -588,7 +588,7 @@ FUNC_START();
 FUNC_END();
        return SERVICE_ADAPTOR_INTERNAL_ERROR_NONE;
 }
-//LCOV_EXCL_STOP
+/* LCOV_EXCL_STOP */
 
 service_adaptor_internal_error_code_e service_adaptor_start(service_adaptor_h service_adaptor)
 {
@@ -685,6 +685,7 @@ FUNC_START();
                return SERVICE_ADAPTOR_INTERNAL_ERROR_START;
        }
 
+/* LCOV_EXCL_START */
 FUNC_STEP();
        int ret = auth_adaptor_stop(service_adaptor->auth_handle);
        ret += contact_adaptor_stop(service_adaptor->contact_handle);
@@ -704,6 +705,7 @@ FUNC_STEP();
 
 FUNC_END();
        return SERVICE_ADAPTOR_INTERNAL_ERROR_NONE;
+/* LCOV_EXCL_STOP */
 }
 
 /**************************************************************************
@@ -718,62 +720,62 @@ FUNC_START();
        auth_adaptor_h auth_handle = service_adaptor_create_auth();
 
        if (NULL == auth_handle) {
-               //LCOV_EXCL_START
+               /* LCOV_EXCL_START */
                service_adaptor_error("Could not create auth adaptor");
                return NULL;
-               //LCOV_EXCL_STOP
+               /* LCOV_EXCL_STOP */
        }
 
        contact_adaptor_h contact_handle = service_adaptor_create_contact();
 
        if (NULL == contact_handle) {
-               //LCOV_EXCL_START
+               /* LCOV_EXCL_START */
                service_adaptor_error("Could not create contact adaptor");
                auth_adaptor_destroy(auth_handle);
                return NULL;
-               //LCOV_EXCL_STOP
+               /* LCOV_EXCL_STOP */
        }
 
        message_adaptor_h message_handle = service_adaptor_create_message();
 
        if (NULL == message_handle) {
-               //LCOV_EXCL_START
+               /* LCOV_EXCL_START */
                service_adaptor_error("Could not create message adaptor");
                auth_adaptor_destroy(auth_handle);
                contact_adaptor_destroy(contact_handle);
                return NULL;
-               //LCOV_EXCL_STOP
+               /* LCOV_EXCL_STOP */
        }
 
        shop_adaptor_h shop_handle = service_adaptor_create_shop();
 
        if (NULL == shop_handle) {
-               //LCOV_EXCL_START
+               /* LCOV_EXCL_START */
                service_adaptor_error("Could not create shop adaptor");
                auth_adaptor_destroy(auth_handle);
                contact_adaptor_destroy(contact_handle);
                message_adaptor_destroy(message_handle);
                return NULL;
-               //LCOV_EXCL_STOP
+               /* LCOV_EXCL_STOP */
        }
 
        storage_adaptor_h storage_handle = service_adaptor_create_storage();
 
        if (NULL == storage_handle) {
-               //LCOV_EXCL_START
+               /* LCOV_EXCL_START */
                service_adaptor_error("Could not create storage adaptor");
                auth_adaptor_destroy(auth_handle);
                contact_adaptor_destroy(contact_handle);
                message_adaptor_destroy(message_handle);
                shop_adaptor_destroy(shop_handle);
                return NULL;
-               //LCOV_EXCL_STOP
+               /* LCOV_EXCL_STOP */
        }
 
        push_adaptor_h push_handle = service_adaptor_create_push();
 
        if (NULL == push_handle) {
-               //LCOV_EXCL_START
+               /* LCOV_EXCL_START */
                service_adaptor_error("Could not create push adaptor");
                auth_adaptor_destroy(auth_handle);
                contact_adaptor_destroy(contact_handle);
@@ -781,14 +783,14 @@ FUNC_START();
                shop_adaptor_destroy(shop_handle);
                storage_adaptor_destroy(storage_handle);
                return NULL;
-               //LCOV_EXCL_STOP
+               /* LCOV_EXCL_STOP */
        }
 
        /* register listener of adaptor */
        auth_adaptor_listener_h auth_listener = service_adaptor_register_auth_listener(auth_handle);
 
        if (NULL == auth_listener) {
-               //LCOV_EXCL_START
+               /* LCOV_EXCL_START */
                service_adaptor_error("Could not create auth listener");
                auth_adaptor_destroy(auth_handle);
                contact_adaptor_destroy(contact_handle);
@@ -797,13 +799,13 @@ FUNC_START();
                storage_adaptor_destroy(storage_handle);
                push_adaptor_destroy(push_handle);
                return NULL;
-               //LCOV_EXCL_STOP
+               /* LCOV_EXCL_STOP */
        }
 
        contact_adaptor_listener_h contact_listener = service_adaptor_register_contact_listener(contact_handle);
 
        if (NULL == contact_listener) {
-               //LCOV_EXCL_START
+               /* LCOV_EXCL_START */
                service_adaptor_error("Could not create contact listener");
                auth_adaptor_unregister_listener(auth_handle, auth_listener);
 
@@ -814,13 +816,13 @@ FUNC_START();
                storage_adaptor_destroy(storage_handle);
                push_adaptor_destroy(push_handle);
                return NULL;
-               //LCOV_EXCL_STOP
+               /* LCOV_EXCL_STOP */
        }
 
        message_adaptor_listener_h message_listener = service_adaptor_register_message_listener(message_handle);
 
        if (NULL == message_listener) {
-               //LCOV_EXCL_START
+               /* LCOV_EXCL_START */
                service_adaptor_error("Could not create message listener");
                auth_adaptor_unregister_listener(auth_handle, auth_listener);
                contact_adaptor_unregister_listener(contact_handle, contact_listener);
@@ -832,13 +834,13 @@ FUNC_START();
                storage_adaptor_destroy(storage_handle);
                push_adaptor_destroy(push_handle);
                return NULL;
-               //LCOV_EXCL_STOP
+               /* LCOV_EXCL_STOP */
        }
 
        shop_adaptor_listener_h shop_listener = service_adaptor_register_shop_listener(shop_handle);
 
        if (NULL == shop_listener) {
-               //LCOV_EXCL_START
+               /* LCOV_EXCL_START */
                service_adaptor_error("Could not create shop listener");
                auth_adaptor_unregister_listener(auth_handle, auth_listener);
                contact_adaptor_unregister_listener(contact_handle, contact_listener);
@@ -851,13 +853,13 @@ FUNC_START();
                storage_adaptor_destroy(storage_handle);
                push_adaptor_destroy(push_handle);
                return NULL;
-               //LCOV_EXCL_STOP
+               /* LCOV_EXCL_STOP */
        }
 
        storage_adaptor_listener_h storage_listener = service_adaptor_register_storage_listener(storage_handle);
 
        if (NULL == storage_listener) {
-               //LCOV_EXCL_START
+               /* LCOV_EXCL_START */
                service_adaptor_error("Could not create storage listener");
                auth_adaptor_unregister_listener(auth_handle, auth_listener);
                contact_adaptor_unregister_listener(contact_handle, contact_listener);
@@ -871,13 +873,13 @@ FUNC_START();
                storage_adaptor_destroy(storage_handle);
                push_adaptor_destroy(push_handle);
                return NULL;
-               //LCOV_EXCL_STOP
+               /* LCOV_EXCL_STOP */
        }
 
        push_adaptor_listener_h push_listener = service_adaptor_register_push_listener(push_handle);
 
        if (NULL == push_listener) {
-               //LCOV_EXCL_START
+               /* LCOV_EXCL_START */
                service_adaptor_error("Could not create push listener");
                auth_adaptor_unregister_listener(auth_handle, auth_listener);
                contact_adaptor_unregister_listener(contact_handle, contact_listener);
@@ -892,14 +894,14 @@ FUNC_START();
                storage_adaptor_destroy(storage_handle);
                push_adaptor_destroy(push_handle);
                return NULL;
-               //LCOV_EXCL_STOP
+               /* LCOV_EXCL_STOP */
        }
 
        /* create Service Adaptor */
        service_adaptor_h service_adaptor = (service_adaptor_h) g_malloc0(sizeof(service_adaptor_s));
 
        if (NULL == service_adaptor) {
-               //LCOV_EXCL_START
+               /* LCOV_EXCL_START */
                service_adaptor_error("Could not create service adaptor");
                auth_adaptor_unregister_listener(auth_handle, auth_listener);
                contact_adaptor_unregister_listener(contact_handle, contact_listener);
@@ -915,7 +917,7 @@ FUNC_START();
                storage_adaptor_destroy(storage_handle);
                push_adaptor_destroy(push_handle);
                return NULL;
-               //LCOV_EXCL_STOP
+               /* LCOV_EXCL_STOP */
        }
 
 FUNC_STEP();
@@ -996,6 +998,7 @@ FUNC_START();
 
        service_adaptor_debug_func("### Preload service len : %d", svc_len);
        if (SERVICE_ADAPTOR_INTERNAL_ERROR_NONE == ret) {
+       /* LCOV_EXCL_START */
                for (int i = 0; i < svc_len; i++) {
                        service_adaptor_context_info_s new_context_info;
                        __init_context_info_s(new_context_info);
@@ -1010,6 +1013,7 @@ FUNC_START();
                        service_adaptor_debug_func("### Preload service : ret(%d) service_name(%s)", ret, service_name);
                }
                free(services);
+       /* LCOV_EXCL_STOP */
        }
 
 FUNC_END();
@@ -1094,7 +1098,7 @@ void service_adaptor_deinit()
        service_adaptor_debug("Service Adaptor: Deinitialized");
 }
 
-//LCOV_EXCL_START
+/* LCOV_EXCL_START */
 /**
  * @brief main signal function
  *
@@ -1266,7 +1270,7 @@ FUNC_START();
 FUNC_END();
        return ret;
 }
-//LCOV_EXCL_STOP
+/* LCOV_EXCL_STOP */
 
 /**
  * @brief main function
@@ -1367,7 +1371,7 @@ static __thread struct timeval tv;
 
 #endif
 
-//LCOV_EXCL_START
+/* LCOV_EXCL_START */
 void SERVICE_ADAPTOR_API_TIME_CHECK_START()
 {
 #ifdef SERVICE_ADAPTOR_DEBUG_TIME_CHECK
@@ -1481,4 +1485,4 @@ void SERVICE_ADAPTOR_API_TIME_CHECK_TOTAL_REPORT(const char *service_name)
        service_adaptor_debug_func("[TIMECHECK]================================================");
 #endif
 }
-//LCOV_EXCL_STOP
+/* LCOV_EXCL_STOP */