diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2010-05-13 00:28:05 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2010-05-13 00:28:05 +0200 |
commit | 04200c29b18c961e24bb16f361e726476241b128 (patch) | |
tree | f48834caa5a66b54276289f8baccb2e26fe19021 | |
parent | 50912571f40e319a76058b656b2118713f7aad05 (diff) | |
download | connman-04200c29b18c961e24bb16f361e726476241b128.tar.gz connman-04200c29b18c961e24bb16f361e726476241b128.tar.bz2 connman-04200c29b18c961e24bb16f361e726476241b128.zip |
Portal check for Bluetooth, WiMAX and cellular networks
By not checking for a portal with those networks, they were left in a
connected state, never moving to online.
-rw-r--r-- | plugins/portal.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/plugins/portal.c b/plugins/portal.c index 59210924..b30ea7af 100644 --- a/plugins/portal.c +++ b/plugins/portal.c @@ -399,9 +399,19 @@ static int location_detect(struct connman_location *location) enum connman_service_type service_type; service_type = connman_location_get_type(location); - if (service_type != CONNMAN_SERVICE_TYPE_WIFI && - service_type != CONNMAN_SERVICE_TYPE_ETHERNET) - return 0; + switch (service_type) { + case CONNMAN_SERVICE_TYPE_ETHERNET: + case CONNMAN_SERVICE_TYPE_WIFI: + case CONNMAN_SERVICE_TYPE_WIMAX: + case CONNMAN_SERVICE_TYPE_BLUETOOTH: + case CONNMAN_SERVICE_TYPE_CELLULAR: + break; + case CONNMAN_SERVICE_TYPE_UNKNOWN: + case CONNMAN_SERVICE_TYPE_SYSTEM: + case CONNMAN_SERVICE_TYPE_GPS: + case CONNMAN_SERVICE_TYPE_VPN: + return -EOPNOTSUPP; + } data = g_try_new0(struct server_data, 1); if (data == NULL) |