Fix dbus method return value
[platform/core/connectivity/net-config.git] / src / network-state.c
index 61c5242..bbd34a4 100755 (executable)
@@ -1305,13 +1305,13 @@ static gboolean handle_add_route(
                if (ip_addr == NULL || netmask == NULL || interface == NULL) {
                        ERR("Invalid parameter");
                        netconfig_error_invalid_parameter(context);
-                       return FALSE;
+                       return TRUE;
                }
 
                if (netconfig_execute_file(path, args, envs) < 0) {
                        DBG("Failed to add a new route");
                        netconfig_error_permission_denied(context);
-                       return FALSE;
+                       return TRUE;
                }
 
                break;
@@ -1319,7 +1319,7 @@ static gboolean handle_add_route(
                if (ip_addr == NULL || interface == NULL || gateway == NULL) {
                        ERR("Invalid parameter");
                        netconfig_error_invalid_parameter(context);
-                       return FALSE;
+                       return TRUE;
                }
 
                buf = ip_addr;
@@ -1335,13 +1335,13 @@ static gboolean handle_add_route(
                if (netconfig_add_route_ipv6(ip_addr, interface, gateway, prefix_len) < 0) {
                        DBG("Failed to add a new route");
                        netconfig_error_permission_denied(context);
-                       return FALSE;
+                       return TRUE;
                }
                break;
        default:
                DBG("Unknown Address Family");
                netconfig_error_invalid_parameter(context);
-               return FALSE;
+               return TRUE;
        }
 
        DBG("Successfully added a new route");
@@ -1375,19 +1375,19 @@ static gboolean handle_remove_route(
                if (ip_addr == NULL || netmask == NULL || interface == NULL) {
                        DBG("Invalid parameter!");
                        netconfig_error_invalid_parameter(context);
-                       return FALSE;
+                       return TRUE;
                }
                if (netconfig_execute_file(path, args, envs) < 0) {
                        DBG("Failed to remove the route");
                        netconfig_error_permission_denied(context);
-                       return FALSE;
+                       return TRUE;
                }
                break;
        case AF_INET6:
                if (ip_addr == NULL || interface == NULL || gateway == NULL) {
                        DBG("Invalid parameter!");
                        netconfig_error_invalid_parameter(context);
-                       return FALSE;
+                       return TRUE;
                }
 
                buf = ip_addr;
@@ -1403,13 +1403,13 @@ static gboolean handle_remove_route(
                if (netconfig_del_route_ipv6(ip_addr, interface, gateway, prefix_len) < 0) {
                        DBG("Failed to remove the route");
                        netconfig_error_permission_denied(context);
-                       return FALSE;
+                       return TRUE;
                }
                break;
        default:
                DBG("Unknown Address Family");
                netconfig_error_invalid_parameter(context);
-               return FALSE;
+               return TRUE;
        }
 
        DBG("Successfully removed the route");
@@ -1449,7 +1449,7 @@ gboolean handle_ethernet_cable_state(Network *object,
        if (ret != 0) {
                DBG("Failed to get ethernet cable state");
                netconfig_error_fail_ethernet_cable_state(context);
-               return FALSE;
+               return TRUE;
        }
 
        DBG("Successfully get ethernet cable state[%d]", state);
@@ -1478,7 +1478,7 @@ gboolean handle_preferred_ipv6_address(Network *object,
        if (address == NULL) {
                DBG("Failed to get preferred IPv6 address");
                netconfig_error_fail_preferred_ipv6_address(context);
-               return FALSE;
+               return TRUE;
        }
 
        DBG("Successfully get preferred IPv6 address[%s]", address);