summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2010-08-03 21:59:58 (GMT)
committerSamuel Ortiz <sameo@linux.intel.com>2010-08-03 22:20:56 (GMT)
commit0d88492879e13675fffe42624d9768b0088fa123 (patch)
tree6937dad456625cf16fb2a0fe81d4c31c7b797fdc
parent658d55c9257338e26ea89cd72ef5113be97bdaa5 (diff)
downloadconnman-0d88492879e13675fffe42624d9768b0088fa123.zip
connman-0d88492879e13675fffe42624d9768b0088fa123.tar.gz
connman-0d88492879e13675fffe42624d9768b0088fa123.tar.bz2
Add ipconfig layer to the VPN services
-rw-r--r--src/provider.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/provider.c b/src/provider.c
index e061098..0747682 100644
--- a/src/provider.c
+++ b/src/provider.c
@@ -620,6 +620,28 @@ void connman_provider_set_data(struct connman_provider *provider, void *data)
void connman_provider_set_index(struct connman_provider *provider, int index)
{
+ struct connman_service *service = provider->vpn_service;
+ struct connman_ipconfig *ipconfig;
+
+ DBG("");
+
+ ipconfig = __connman_service_get_ipconfig(service);
+
+ if (ipconfig == NULL) {
+ __connman_service_create_ipconfig(service, index);
+
+ ipconfig = __connman_service_get_ipconfig(service);
+ if (ipconfig == NULL) {
+ DBG("Couldnt create ipconfig");
+ goto done;
+ }
+ }
+
+ connman_ipconfig_set_method(ipconfig, CONNMAN_IPCONFIG_METHOD_FIXED);
+ __connman_ipconfig_set_index(ipconfig, index);
+
+
+done:
provider->element.index = index;
}