Fix dbus method return value
[platform/core/connectivity/net-config.git] / src / wifi-eap-config.c
index 49283ba..66f67eb 100755 (executable)
@@ -463,16 +463,15 @@ gboolean handle_create_eap_config(Wifi *wifi, GDBusMethodInvocation *context,
                const gchar *service, GVariant *fields)
 {
        gboolean updated = FALSE;
-       gboolean reply = FALSE;
        gboolean result = FALSE;
 
-       g_return_val_if_fail(wifi != NULL, FALSE);
+       g_return_val_if_fail(wifi != NULL, TRUE);
 
        DBG("Set agent fields for %s", service);
 
        if (netconfig_is_wifi_profile(service) != TRUE) {
                netconfig_error_dbus_method_return(context, NETCONFIG_ERROR_WRONG_PROFILE, "InvalidService");
-               return reply;
+               return TRUE;
        }
 
        updated = __netconfig_create_config(fields);
@@ -524,20 +523,18 @@ gboolean handle_create_eap_config(Wifi *wifi, GDBusMethodInvocation *context,
 
        if (result != TRUE)
                ERR("Fail to connect %s", service);
-       else
-               reply = TRUE;
 
-       return reply;
+       return TRUE;
 }
 
 gboolean handle_delete_eap_config(Wifi *wifi, GDBusMethodInvocation *context,
                const gchar *profile)
 {
-       g_return_val_if_fail(wifi != NULL, FALSE);
+       g_return_val_if_fail(wifi != NULL, TRUE);
 
        wifi_complete_delete_eap_config(wifi, context);
 
-       gboolean ret = __netconfig_delete_config((const char *)profile);
+       __netconfig_delete_config((const char *)profile);
 
-       return ret;
+       return TRUE;
 }