From 04200c29b18c961e24bb16f361e726476241b128 Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Thu, 13 May 2010 00:28:05 +0200 Subject: [PATCH] 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. --- plugins/portal.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/plugins/portal.c b/plugins/portal.c index 5921092..b30ea7a 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) -- 2.7.4