Fix invalid syntax for g_variant_get() 67/186867/1
authorShagun Garg <shagun1.garg@samsung.com>
Thu, 16 Aug 2018 05:25:52 +0000 (10:55 +0530)
committerShagun Garg <shagun1.garg@samsung.com>
Thu, 16 Aug 2018 05:31:26 +0000 (11:01 +0530)
This patch fixes the error in usage of g_variant_get()

Signed-off-by: Shagun Garg <shagun1.garg@samsung.com>
Change-Id: I9da02346cdfa1eb2557f1b5ba70ed923c9c96d88

packaging/capi-network-wifi-direct.spec [changed mode: 0644->0755]
src/wifi-direct-client-proxy.c [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 7cf4722..e82fc21
@@ -3,7 +3,7 @@
 
 Name:       capi-network-wifi-direct
 Summary:    Network WiFi-Direct Library
-Version:    1.2.97
+Version:    1.2.98
 Release:    1
 Group:      Network & Connectivity/API
 License:    Apache-2.0
old mode 100644 (file)
new mode 100755 (executable)
index 5f1e50f..bbbdd32
@@ -376,7 +376,7 @@ void wifi_direct_process_manage_peer_ip_assigned(GDBusConnection *connection,
                                                 gpointer user_data)
 {
        __WDC_LOG_FUNC_START__;
-       char *get_str = NULL;
+       const char *get_str = NULL;
        GError* error = NULL;
        GVariant *reply = NULL;
        const gchar *peer_mac_address = NULL;
@@ -410,7 +410,7 @@ void wifi_direct_process_manage_peer_ip_assigned(GDBusConnection *connection,
                return;
        }
 
-       g_variant_get(reply, "(i&s)", ret, &get_str);
+       g_variant_get(reply, "(i&s)", &ret, &get_str);
        g_variant_unref(reply);
 
        WDC_LOGD("Interface Name = [%s]", get_str);
@@ -3011,7 +3011,7 @@ int wifi_direct_get_network_interface_name(char **name)
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
        wifi_direct_state_e status = 0;
-       char *get_str = NULL;
+       const char *get_str = NULL;
        GError* error = NULL;
        GVariant *reply = NULL;
        int ret = WIFI_DIRECT_ERROR_NONE;
@@ -3046,7 +3046,7 @@ int wifi_direct_get_network_interface_name(char **name)
        if (ret != WIFI_DIRECT_ERROR_NONE)
                return ret;
 
-       g_variant_get(reply, "(i&s)", ret, &get_str);
+       g_variant_get(reply, "(i&s)", &ret, &get_str);
        if (get_str != NULL)
                *name = strdup(get_str);
        g_variant_unref(reply);
@@ -3090,7 +3090,7 @@ int wifi_direct_get_ip_address(char **ip_address)
        if (ret != WIFI_DIRECT_ERROR_NONE)
                return ret;
 
-       g_variant_get(reply, "(i&s)", ret, &str);
+       g_variant_get(reply, "(i&s)", &ret, &str);
        if (str != NULL)
                *ip_address = strdup(str);
        g_variant_unref(reply);
@@ -3142,7 +3142,7 @@ int wifi_direct_get_subnet_mask(char **subnet_mask)
        if (ret != WIFI_DIRECT_ERROR_NONE)
                return ret;
 
-       g_variant_get(reply, "(i&s)", ret, &get_str);
+       g_variant_get(reply, "(i&s)", &ret, &get_str);
        if (get_str != NULL)
                *subnet_mask = strdup(get_str);
        g_variant_unref(reply);
@@ -3163,7 +3163,7 @@ int wifi_direct_get_gateway_address(char **gateway_address)
        wifi_direct_state_e status = 0;
        GError* error = NULL;
        GVariant *reply = NULL;
-       char *get_str = NULL;
+       const char *get_str = NULL;
        int ret = WIFI_DIRECT_ERROR_NONE;
 
        if (g_client_info.is_registered == false) {
@@ -3195,7 +3195,7 @@ int wifi_direct_get_gateway_address(char **gateway_address)
        if (ret != WIFI_DIRECT_ERROR_NONE)
                return ret;
 
-       g_variant_get(reply, "(i&s)", ret, &get_str);
+       g_variant_get(reply, "(i&s)", &ret, &get_str);
        if (get_str != NULL)
                *gateway_address = strdup(get_str);
        g_variant_unref(reply);