[ASAN-TFDF-1808, TFDF-1821] Use proper data type for GVariant 09/204709/2 accepted/tizen/unified/20190429.103644 submit/tizen/20190426.022140
authorSeonah Moon <seonah1.moon@samsung.com>
Fri, 26 Apr 2019 01:56:43 +0000 (10:56 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Fri, 26 Apr 2019 02:14:49 +0000 (11:14 +0900)
Change-Id: I6f48c48e675cbacc1d8d10a452b2d2f87e7aeaed

include/softap_private.h
packaging/capi-network-softap.spec
src/softap.c

index ae600e633d85d40afec3febcf12fe290bd8801c8..2c6a8fd1f49493d36a0834c965667b75dbbf9180 100644 (file)
@@ -244,8 +244,8 @@ typedef struct {
        char passphrase[SOFTAP_KEY_MAX_LEN + 1];
        char ip_address[SOFTAP_IPV4_ADDRESS_MAX_LEN + 1];
        char vendor[SOFTAP_VENDOR_MAX_LEN + 1];
-       bool visibility;
-       bool dhcp_enabled;
+       gboolean visibility;
+       gboolean dhcp_enabled;
        softap_security_type_e sec_type;
        softap_wireless_mode_e mode;
        int channel;
index f9f0b13d79f9d2f8635b8d709b9303688efdbccd..75dca2412e6c965a2051d9fcbcf30f18eb0e63dc 100644 (file)
@@ -1,6 +1,6 @@
 Name:          capi-network-softap
 Summary:       Softap Framework
-Version:       0.0.27
+Version:       0.0.28
 Release:       1
 Group:         System/Network
 License:       Apache-2.0
index e4c3a458a1dba22f5c1817ac0ad555eaf4bb7e75..5dcc5115ab6c285b1f52a1a769be4292577bb4a0 100755 (executable)
@@ -739,7 +739,7 @@ API int softap_create(softap_h *softap)
 
        memset(sa, 0x00, sizeof(__softap_h));
 
-       sa->visibility = true;
+       sa->visibility = TRUE;
        sa->sec_type = SOFTAP_SECURITY_TYPE_WPA2_PSK;
 
        if (__get_common_ssid(ssid, sizeof(ssid)) != SOFTAP_ERROR_NONE) {
@@ -770,7 +770,7 @@ API int softap_create(softap_h *softap)
 
        sa->channel = SOFTAP_DEFAULT_CHANNEL;
        sa->mode = SOFTAP_WIRELESS_MODE_G;
-       sa->dhcp_enabled = false;
+       sa->dhcp_enabled = FALSE;
 
        /* GDbus Setting */
 #if !GLIB_CHECK_VERSION(2, 36, 0)
@@ -1602,7 +1602,7 @@ API int softap_set_ssid_visibility(softap_h softap, bool visible)
                        "parameter(softap) is NULL\n");
 
        __softap_h *sa = (__softap_h *) softap;
-       sa->visibility = visible;
+       sa->visibility = visible ? TRUE : FALSE;
 
        return SOFTAP_ERROR_NONE;
 }
@@ -1925,7 +1925,7 @@ API int softap_enable_dhcp(softap_h softap)
                        result = SOFTAP_ERROR_OPERATION_FAILED;
 
                g_error_free(error);
-               sa->dhcp_enabled = false;
+               sa->dhcp_enabled = FALSE;
 
                return result;
 //LCOV_EXCL_STOP
@@ -1934,7 +1934,7 @@ API int softap_enable_dhcp(softap_h softap)
        g_variant_get(parameters, "(u)", &result);
        g_variant_unref(parameters);
 
-       sa->dhcp_enabled = true;
+       sa->dhcp_enabled = TRUE;
 
        return SOFTAP_ERROR_NONE;
 }
@@ -1970,7 +1970,7 @@ API int softap_disable_dhcp(softap_h softap)
        g_variant_get(parameters, "(u)", &result);
        g_variant_unref(parameters);
 
-       sa->dhcp_enabled = false;
+       sa->dhcp_enabled = FALSE;
 
        return SOFTAP_ERROR_NONE;
 }
@@ -1988,7 +1988,7 @@ API int softap_is_dhcp_enabled(softap_h softap, bool *dhcp_enabled)
        GVariant *parameters = NULL;
        GDBusProxy *proxy = sa->client_bus_proxy;
        int ret = SOFTAP_ERROR_NONE;
-       bool enabled = false;
+       gboolean enabled = FALSE;
 
        parameters = g_dbus_proxy_call_sync(proxy, "get_dhcp_state",
                        NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
@@ -2010,7 +2010,7 @@ API int softap_is_dhcp_enabled(softap_h softap, bool *dhcp_enabled)
        }
 
        sa->dhcp_enabled = enabled;
-       *dhcp_enabled = sa->dhcp_enabled;
+       *dhcp_enabled = sa->dhcp_enabled == TRUE ? true : false;
 
        return ret;
 }
@@ -2046,7 +2046,7 @@ API int softap_enable_dhcp_with_range(softap_h softap, char *rangestart, char *r
                        result = SOFTAP_ERROR_OPERATION_FAILED;
 
                g_error_free(error);
-               sa->dhcp_enabled = false;
+               sa->dhcp_enabled = FALSE;
 
                return result;
 //LCOV_EXCL_STOP
@@ -2055,7 +2055,7 @@ API int softap_enable_dhcp_with_range(softap_h softap, char *rangestart, char *r
        g_variant_get(parameters, "(u)", &result);
        g_variant_unref(parameters);
 
-       sa->dhcp_enabled = true;
+       sa->dhcp_enabled = TRUE;
 
        return SOFTAP_ERROR_NONE;
 }