ipconfig: Rename ipconfig_set/clear_address routines
authorSamuel Ortiz <sameo@linux.intel.com>
Wed, 23 Feb 2011 19:38:33 +0000 (20:38 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Wed, 23 Feb 2011 19:38:33 +0000 (20:38 +0100)
src/connman.h
src/ipconfig.c
src/network.c
src/service.c

index 842e424..5bcb827 100644 (file)
@@ -261,8 +261,8 @@ void __connman_ipconfig_set_element_ipv6_gateway(
                        struct connman_ipconfig *ipconfig,
                                struct connman_element *element);
 
-int __connman_ipconfig_set_address(struct connman_ipconfig *ipconfig);
-int __connman_ipconfig_clear_address(struct connman_ipconfig *ipconfig);
+int __connman_ipconfig_address_add(struct connman_ipconfig *ipconfig);
+int __connman_ipconfig_address_remove(struct connman_ipconfig *ipconfig);
 unsigned char __connman_ipconfig_netmask_prefix_len(const char *netmask);
 
 int __connman_ipconfig_set_proxy_autoconfig(struct connman_ipconfig *ipconfig,
index 63153f8..0ca44b8 100644 (file)
@@ -1343,17 +1343,17 @@ void __connman_ipconfig_set_element_ipv6_gateway(
                element->ipv6.gateway = ipconfig->address->gateway;
 }
 
-int __connman_ipconfig_set_address(struct connman_ipconfig *ipconfig)
+int __connman_ipconfig_address_add(struct connman_ipconfig *ipconfig)
 {
        DBG("");
 
        switch (ipconfig->method) {
        case CONNMAN_IPCONFIG_METHOD_UNKNOWN:
        case CONNMAN_IPCONFIG_METHOD_OFF:
-       case CONNMAN_IPCONFIG_METHOD_FIXED:
-       case CONNMAN_IPCONFIG_METHOD_DHCP:
        case CONNMAN_IPCONFIG_METHOD_AUTO:
                break;
+       case CONNMAN_IPCONFIG_METHOD_FIXED:
+       case CONNMAN_IPCONFIG_METHOD_DHCP:
        case CONNMAN_IPCONFIG_METHOD_MANUAL:
                if (ipconfig->type == CONNMAN_IPCONFIG_TYPE_IPV4)
                        return connman_inet_set_address(ipconfig->index,
@@ -1366,7 +1366,7 @@ int __connman_ipconfig_set_address(struct connman_ipconfig *ipconfig)
        return 0;
 }
 
-int __connman_ipconfig_clear_address(struct connman_ipconfig *ipconfig)
+int __connman_ipconfig_address_remove(struct connman_ipconfig *ipconfig)
 {
        DBG("");
 
@@ -1378,10 +1378,10 @@ int __connman_ipconfig_clear_address(struct connman_ipconfig *ipconfig)
        switch (ipconfig->method) {
        case CONNMAN_IPCONFIG_METHOD_UNKNOWN:
        case CONNMAN_IPCONFIG_METHOD_OFF:
-       case CONNMAN_IPCONFIG_METHOD_FIXED:
-       case CONNMAN_IPCONFIG_METHOD_DHCP:
        case CONNMAN_IPCONFIG_METHOD_AUTO:
                break;
+       case CONNMAN_IPCONFIG_METHOD_FIXED:
+       case CONNMAN_IPCONFIG_METHOD_DHCP:
        case CONNMAN_IPCONFIG_METHOD_MANUAL:
                if (ipconfig->type == CONNMAN_IPCONFIG_TYPE_IPV4)
                        return connman_inet_clear_address(ipconfig->index,
index a0867fc..3f3e825 100644 (file)
@@ -695,7 +695,7 @@ static void set_connected_manual(struct connman_network *network)
 
        set_configuration(network);
 
-       err = __connman_ipconfig_set_address(ipconfig);
+       err = __connman_ipconfig_address_add(ipconfig);
        if (err < 0) {
                connman_network_set_error(network,
                        CONNMAN_NETWORK_ERROR_CONFIGURE_FAIL);
@@ -755,7 +755,7 @@ static int manual_ipv6_set(struct connman_network *network,
        if (service == NULL)
                return -EINVAL;
 
-       err = __connman_ipconfig_set_address(ipconfig_ipv6);
+       err = __connman_ipconfig_address_add(ipconfig_ipv6);
        if (err < 0) {
                connman_network_set_error(network,
                        CONNMAN_NETWORK_ERROR_CONFIGURE_FAIL);
@@ -1081,7 +1081,7 @@ static int manual_ipv4_set(struct connman_network *network,
        if (service == NULL)
                return -EINVAL;
 
-       err = __connman_ipconfig_set_address(ipconfig);
+       err = __connman_ipconfig_address_add(ipconfig);
        if (err < 0) {
                connman_network_set_error(network,
                        CONNMAN_NETWORK_ERROR_CONFIGURE_FAIL);
@@ -1120,7 +1120,7 @@ int __connman_network_clear_ipconfig(struct connman_network *network,
        case CONNMAN_IPCONFIG_METHOD_AUTO:
                return -EINVAL;
        case CONNMAN_IPCONFIG_METHOD_MANUAL:
-               __connman_ipconfig_clear_address(ipconfig);
+               __connman_ipconfig_address_remove(ipconfig);
                break;
        case CONNMAN_IPCONFIG_METHOD_DHCP:
                dhcp_stop(network);
index 6ff90e7..91b7739 100644 (file)
@@ -3863,8 +3863,8 @@ int __connman_service_disconnect(struct connman_service *service)
                __connman_ipconfig_set_proxy_autoconfig(service->ipconfig_ipv6,
                                                        NULL);
 
-       __connman_ipconfig_clear_address(service->ipconfig_ipv4);
-       __connman_ipconfig_clear_address(service->ipconfig_ipv6);
+       __connman_ipconfig_address_remove(service->ipconfig_ipv4);
+       __connman_ipconfig_address_remove(service->ipconfig_ipv6);
 
        __connman_ipconfig_disable(service->ipconfig_ipv4);
        __connman_ipconfig_disable(service->ipconfig_ipv6);