diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2011-02-25 19:31:04 +0100 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-02-25 19:31:04 +0100 |
commit | 76b454562798599cfc81ada45e3d634117c89aed (patch) | |
tree | 56c6504995added3e9462836f089125bc6e941cf /src/provider.c | |
parent | af62314caf469a2d87380c211b0308987065be07 (diff) | |
download | connman-76b454562798599cfc81ada45e3d634117c89aed.tar.gz connman-76b454562798599cfc81ada45e3d634117c89aed.tar.bz2 connman-76b454562798599cfc81ada45e3d634117c89aed.zip |
service: Add a generic ipconfig selection routine
Diffstat (limited to 'src/provider.c')
-rw-r--r-- | src/provider.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/provider.c b/src/provider.c index 816ad3d6..c930d373 100644 --- a/src/provider.c +++ b/src/provider.c @@ -683,14 +683,8 @@ int connman_provider_set_ipaddress(struct connman_provider *provider, { struct connman_ipconfig *ipconfig = NULL; - if (ipaddress->family == CONNMAN_IPCONFIG_TYPE_IPV4) { - ipconfig = __connman_service_get_ip4config( - provider->vpn_service); - } else if (ipaddress->family == CONNMAN_IPCONFIG_TYPE_IPV6) { - ipconfig = __connman_service_get_ip6config( - provider->vpn_service); - } - + ipconfig = __connman_service_get_ipconfig(provider->vpn_service, + ipaddress->family); if (ipconfig == NULL) return -EINVAL; |