provider: route_env_parse should depend on type not name
authorDaniel Wagner <daniel.wagner@bmw-carit.de>
Thu, 27 Jan 2011 13:11:19 +0000 (14:11 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 27 Jan 2011 14:32:40 +0000 (15:32 +0100)
src/provider.c

index 279cec3..e6bcb3d 100644 (file)
@@ -783,7 +783,7 @@ static int route_env_parse(struct connman_provider *provider, const char *key,
 
        DBG("name %s", provider->name);
 
-       if (!strcmp(provider->name, "openvpn")) {
+       if (!strcmp(provider->type, "openvpn")) {
                if (g_str_has_prefix(key, "route_network_") == TRUE) {
                        start = key + strlen("route_network_");
                        *type = PROVIDER_ROUTE_TYPE_ADDR;
@@ -799,7 +799,7 @@ static int route_env_parse(struct connman_provider *provider, const char *key,
                *family = AF_INET;
                *idx = g_ascii_strtoull(start, &end, 10);
 
-       } else if (!strcmp(provider->name, "openconnect")) {
+       } else if (!strcmp(provider->type, "openconnect")) {
                if (g_str_has_prefix(key, "CISCO_SPLIT_INC_") == TRUE) {
                        *family = AF_INET;
                        start = key + strlen("CISCO_SPLIT_INC_");