Remove LCOV tags 68/236468/1
authorSeonah Moon <seonah1.moon@samsung.com>
Wed, 17 Jun 2020 08:09:41 +0000 (17:09 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Wed, 17 Jun 2020 08:09:49 +0000 (17:09 +0900)
Change-Id: Ic6fc4ae653501dce536911894598cb1946e16a18

src/softap.c
src/softap_private.c

index f2813d6390f700b2f015298868d578ef1e541b8f..18911808c0299a981528c54588d6bd6ddd5d4fc1 100755 (executable)
@@ -257,7 +257,6 @@ static softap_error_e __get_error(int agent_error)
        return err;
 }
 
-//LCOV_EXCL_START
 static void __handle_dhcp(GDBusConnection *connection, const gchar *sender_name,
                const gchar *object_path, const gchar *interface_name, const gchar *signal_name,
                GVariant *parameters, gpointer user_data)
@@ -309,7 +308,6 @@ DONE:
        g_free(name);
        DBG("-");
 }
-//LCOV_EXCL_STOP
 
 static void __handle_softap_on(GDBusConnection *connection, const gchar *sender_name,
                        const gchar *object_path, const gchar *interface_name, const gchar *signal_name,
@@ -332,7 +330,6 @@ static void __handle_softap_on(GDBusConnection *connection, const gchar *sender_
        DBG("-");
 }
 
-//LCOV_EXCL_START
 static void __handle_softap_off(GDBusConnection *connection, const gchar *sender_name,
                        const gchar *object_path, const gchar *interface_name, const gchar *signal_name,
                        GVariant *parameters, gpointer user_data)
@@ -479,7 +476,6 @@ static void __handle_passphrase_changed(GDBusConnection *connection, const gchar
        pcb(data);
        DBG("-");
 }
-//LCOV_EXCL_STOP
 
 static void __enabled_cfm_cb(GObject *source_object, GAsyncResult *res,
                gpointer user_data)
@@ -500,7 +496,6 @@ static void __enabled_cfm_cb(GObject *source_object, GAsyncResult *res,
 
        g_var = g_dbus_proxy_call_finish(sa->client_bus_proxy, res, &g_error);
        if (g_error) {
-//LCOV_EXCL_START
                ERR("DBus error [%s]", g_error->message);
                if (g_error->code == G_DBUS_ERROR_NO_REPLY &&
                                ++retry < SOFTAP_ERROR_RECOVERY_MAX) {
@@ -515,7 +510,6 @@ static void __enabled_cfm_cb(GObject *source_object, GAsyncResult *res,
                else
                        error = SOFTAP_ERROR_OPERATION_FAILED;
                g_error_free(g_error);
-//LCOV_EXCL_STOP
        } else {
                g_variant_get(g_var, "(u)", &info);
                g_variant_unref(g_var);
@@ -557,12 +551,10 @@ static void __disabled_cfm_cb(GObject *source_object, GAsyncResult *res,
 
        g_var = g_dbus_proxy_call_finish(sa->client_bus_proxy, res, &g_error);
        if (g_error) {
-//LCOV_EXCL_START
                ERR("DBus error [%s]", g_error->message);
                g_error_free(g_error);
                DBG("-");
                return;
-//LCOV_EXCL_STOP
        } else {
                g_variant_get(g_var, "(u)", &info);
                g_variant_unref(g_var);
@@ -598,14 +590,12 @@ static void __settings_reloaded_cb(GObject *source_object, GAsyncResult *res,
 
        g_var  = g_dbus_proxy_call_finish(sa->client_bus_proxy, res, &g_error);
        if (g_error) {
-//LCOV_EXCL_START
                ERR("DBus fail [%s]\n", g_error->message);
                if (g_error->code == G_DBUS_ERROR_ACCESS_DENIED)
                        softap_error = SOFTAP_ERROR_PERMISSION_DENIED;
                else
                        softap_error = SOFTAP_ERROR_OPERATION_FAILED;
                g_error_free(g_error);
-//LCOV_EXCL_STOP
        } else {
                g_variant_get(g_var, "(u)", &info);
                g_variant_unref(g_var);
@@ -744,29 +734,23 @@ API int softap_create(softap_h *softap)
        sa->sec_type = SOFTAP_SECURITY_TYPE_WPA2_PSK;
 
        if (__get_common_ssid(ssid, sizeof(ssid)) != SOFTAP_ERROR_NONE) {
-               //LCOV_EXCL_START
                ERR("Fail to get default ssid!!");
                free(sa);
                return SOFTAP_ERROR_OPERATION_FAILED;
-               //LCOV_EXCL_STOP
        }
 
        sa->ssid = g_strdup(ssid);
        if (sa->ssid == NULL) {
-//LCOV_EXCL_START
                ERR("Fail to get default ssid!!");
                free(sa);
                return SOFTAP_ERROR_OPERATION_FAILED;
-//LCOV_EXCL_STOP
        }
 
        if (__get_initial_passphrase(sa->passphrase, sizeof(sa->passphrase)) == 0) {
-//LCOV_EXCL_START
                ERR("Fail to generate random passphrase!!");
                g_free(sa->ssid);
                free(sa);
                return SOFTAP_ERROR_OPERATION_FAILED;
-//LCOV_EXCL_STOP
        }
 
        sa->channel = SOFTAP_DEFAULT_CHANNEL;
@@ -780,7 +764,6 @@ API int softap_create(softap_h *softap)
        GCancellable *cancellable = g_cancellable_new();
        sa->client_bus = g_bus_get_sync(DBUS_BUS_SYSTEM, cancellable, &error);
        if (error) {
-//LCOV_EXCL_START
                ERR("Couldn't connect to the System bus[%s]", error->message);
                g_error_free(error);
                g_cancellable_cancel(cancellable);
@@ -788,7 +771,6 @@ API int softap_create(softap_h *softap)
                g_free(sa->ssid);
                free(sa);
                return SOFTAP_ERROR_OPERATION_FAILED;
-//LCOV_EXCL_STOP
        }
        sa->cancellable = cancellable;
 
@@ -796,7 +778,6 @@ API int softap_create(softap_h *softap)
                        NULL, SOFTAP_SERVICE_NAME, SOFTAP_SERVICE_OBJECT_PATH,
                        SOFTAP_SERVICE_INTERFACE, sa->cancellable, &error);
        if (!sa->client_bus_proxy) {
-//LCOV_EXCL_START
                if (error) {
                        ERR("Fail to create the proxy object because of %s", error->message);
                        g_error_free(error);
@@ -806,7 +787,6 @@ API int softap_create(softap_h *softap)
                g_free(sa->ssid);
                free(sa);
                return SOFTAP_ERROR_OPERATION_FAILED;
-//LCOV_EXCL_STOP
        }
 
         __connect_signals((softap_h)sa);
@@ -1212,7 +1192,6 @@ API int softap_foreach_connected_clients(softap_h softap, softap_connected_clien
        g_variant_get(result, "(a(a{sv}))", &outer_iter);
 
        while (g_variant_iter_loop(outer_iter, "(@a{sv})", &station)) {
-//LCOV_EXCL_START
                g_variant_get(station, "a{sv}", &inner_iter);
 
                while (g_variant_iter_loop(inner_iter, "{sv}", &key, &value)) {
@@ -1264,7 +1243,6 @@ API int softap_foreach_connected_clients(softap_h softap, softap_connected_clien
                }
                g_free(client.hostname);
                client.hostname = NULL;
-//LCOV_EXCL_STOP
        }
        g_variant_iter_free(outer_iter);
        g_variant_unref(result);
@@ -1577,11 +1555,9 @@ API int softap_get_ssid(softap_h softap, char **ssid)
 
        if (__get_ssid_from_vconf(VCONFKEY_SOFTAP_SSID, val, sizeof(val)) == false) {
                if (__get_common_ssid(val, sizeof(val)) != SOFTAP_ERROR_NONE) {
-                       //LCOV_EXCL_START
                        ERR("Fail to get default ssid!!");
                        free(sa);
                        return SOFTAP_ERROR_OPERATION_FAILED;
-                       //LCOV_EXCL_STOP
                }
 
        }
@@ -1673,7 +1649,6 @@ API int softap_get_passphrase(softap_h softap, char **passphrase)
                        NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
 
        if (error) {
-               //LCOV_EXCL_START
                ERR("g_dbus_proxy_call_sync failed because %s\n", error->message);
 
                if (error->code == G_DBUS_ERROR_ACCESS_DENIED)
@@ -1683,7 +1658,6 @@ API int softap_get_passphrase(softap_h softap, char **passphrase)
 
                g_error_free(error);
                return ret;
-               //LCOV_EXCL_STOP
        }
 
        if (parameters != NULL) {
@@ -1715,7 +1689,6 @@ API int softap_push_wps_button(softap_h softap)
                        NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
 
        if (error) {
-//LCOV_EXCL_START
                ERR("g_dbus_proxy_call_sync failed because %s\n", error->message);
 
                if (error->code == G_DBUS_ERROR_ACCESS_DENIED)
@@ -1725,7 +1698,6 @@ API int softap_push_wps_button(softap_h softap)
 
                g_error_free(error);
                return ret;
-//LCOV_EXCL_STOP
        }
 
        if (parameters != NULL) {
@@ -1760,7 +1732,6 @@ API int softap_set_wps_pin(softap_h softap, const char *wps_pin)
                        g_variant_new("(s)", wps_pin), G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
 
        if (error) {
-//LCOV_EXCL_START
                ERR("g_dbus_proxy_call_sync failed because  %s\n", error->message);
 
                if (error->code == G_DBUS_ERROR_ACCESS_DENIED)
@@ -1770,7 +1741,6 @@ API int softap_set_wps_pin(softap_h softap, const char *wps_pin)
 
                g_error_free(error);
                return ret;
-//LCOV_EXCL_STOP
        }
 
        if (parameters != NULL) {
@@ -1920,7 +1890,6 @@ API int softap_enable_dhcp(softap_h softap)
                        NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
 
        if (error) {
-//LCOV_EXCL_START
                ERR("g_dbus_proxy_call_sync failed because  %s\n", error->message);
                if (error->code == G_DBUS_ERROR_ACCESS_DENIED)
                        result = SOFTAP_ERROR_PERMISSION_DENIED;
@@ -1931,7 +1900,6 @@ API int softap_enable_dhcp(softap_h softap)
                sa->dhcp_enabled = FALSE;
 
                return result;
-//LCOV_EXCL_STOP
        }
 
        g_variant_get(parameters, "(u)", &result);
@@ -1958,7 +1926,6 @@ API int softap_disable_dhcp(softap_h softap)
                        NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
 
        if (error) {
-//LCOV_EXCL_START
                ERR("g_dbus_proxy_call_sync failed because  %s\n", error->message);
                if (error->code == G_DBUS_ERROR_ACCESS_DENIED)
                        result = SOFTAP_ERROR_PERMISSION_DENIED;
@@ -1967,7 +1934,6 @@ API int softap_disable_dhcp(softap_h softap)
 
                g_error_free(error);
                return result;
-//LCOV_EXCL_STOP
        }
 
        g_variant_get(parameters, "(u)", &result);
@@ -1997,14 +1963,12 @@ API int softap_is_dhcp_enabled(softap_h softap, bool *dhcp_enabled)
                        NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
 
        if (error) {
-//LCOV_EXCL_START
                ERR("g_dbus_proxy_call_sync failed becuase %s\n", error->message);
 
                if (error->code == G_DBUS_ERROR_ACCESS_DENIED)
                        ret = SOFTAP_ERROR_PERMISSION_DENIED;
                else
                        ret = SOFTAP_ERROR_OPERATION_FAILED;
-//LCOV_EXCL_STOP
        }
 
        if (parameters != NULL) {
@@ -2040,7 +2004,6 @@ API int softap_enable_dhcp_with_range(softap_h softap, char *rangestart, char *r
                        g_variant_new("(ss)", rangestart, rangestop),
                        G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
        if (error) {
-//LCOV_EXCL_START
                ERR("g_dbus_proxy_call_sync failed because  %s\n", error->message);
 
                if (error->code == G_DBUS_ERROR_ACCESS_DENIED)
@@ -2052,7 +2015,6 @@ API int softap_enable_dhcp_with_range(softap_h softap, char *rangestart, char *r
                sa->dhcp_enabled = FALSE;
 
                return result;
-//LCOV_EXCL_STOP
        }
 
        g_variant_get(parameters, "(u)", &result);
index f8ad4306d21d9cd90eecee5a6b272f7df1c63dd3..06dded2263ae11b8bca4737a675c323a7a7cc155 100755 (executable)
@@ -43,18 +43,14 @@ static void __get_feature_info(int feature)
        switch (feature) {
        case SUPPORTED_FEATURE_SOFTAP:
                if (system_info_get_platform_bool(SOFTAP_FEATURE, &feature_supported[feature]) < 0) {
-//LCOV_EXCL_START
                        ERR("Get feature is failed");
                        return;
-//LCOV_EXCL_STOP
                }
                break;
        case SUPPORTED_FEATURE_SOFTAP_ACS:
                if (system_info_get_platform_string(MODEL_NAME_FEATURE, &model_name) < 0) {
-//LCOV_EXCL_START
                        ERR("Get feature is failed");
                        return;
-//LCOV_EXCL_STOP
                }
 
                if (model_name && strncmp(model_name, "artik", strlen("artik")) == 0)