Send connman mailing list submissions to
[email protected]
To subscribe or unsubscribe via email, send a message with subject or
body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."
Today's Topics:
1. RE: [PATCH 0/1] start online check even if service is not the default
service
(VAUTRIN Emmanuel (Canal Plus Prestataire))
2. [PATCH] service: Fix preferred service reordering on ready state
(VAUTRIN Emmanuel (Canal Plus Prestataire))
----------------------------------------------------------------------
Date: Fri, 14 May 2021 08:32:17 +0000
From: "VAUTRIN Emmanuel (Canal Plus Prestataire)"
<[email protected]>
Subject: RE: [PATCH 0/1] start online check even if service is not the
default service
To: Daniel Wagner <[email protected]>, Christophe Ronco
<[email protected]>
Cc: "[email protected]" <[email protected]>
Message-ID: <[email protected]
prd02.prod.outlook.com>
Content-Type: text/plain; charset="iso-8859-1"
Hi Daniel and Christophe,
> The problem is that service_compare() is not honoring
> PreferredTechnologies when both services are in READY/ONLINE state. I'll
> send out a patch.
Strange, by my side, I have also started working on this issue,
but I presumed the reason was elsewhere. I will keep working on my solution
and will also propose a patch soon.
Best Regards,
Emmanuel
------------------------------
Date: Fri, 14 May 2021 12:14:03 +0000
From: "VAUTRIN Emmanuel (Canal Plus Prestataire)"
<[email protected]>
Subject: [PATCH] service: Fix preferred service reordering on ready
state
To: "[email protected]" <[email protected]>
Message-ID: <[email protected]
prd02.prod.outlook.com>
Content-Type: text/plain; charset="iso-8859-1"
When a service reaches the ready state, the service list shall always
be reordered according to the PreferredTechnologies config options.
This issue can be reproduced with PreferredTechnologies=ethernet,wifi,
by following the steps below:
1. Starting, Ethernet (E) plugged, with a known Wifi (W) network.
E idle -> online, W idle -> ready
2. Unplug Ethernet.
E online -> idle, W ready -> online
3. Plug Ethernet.
E idle -> ready, W online
Even if Ethernet has the highest priority, it will never be online,
except if Wifi connection is lost.
Fixes: e600366f6035 ("service: Start online check on IP address update")
---
src/service.c | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/src/service.c b/src/service.c
index 20917a8923a4..cadd9fc76881 100644
--- a/src/service.c
+++ b/src/service.c
@@ -4711,15 +4711,11 @@ static void apply_relevant_default_downgrade(struct
connman_service *service)
struct connman_service *def_service;
def_service = connman_service_get_default();
- if (!def_service)
+ if (!def_service || def_service != service ||
+ def_service->state != CONNMAN_SERVICE_STATE_ONLINE)
return;
- if (def_service == service &&
- def_service->state == CONNMAN_SERVICE_STATE_ONLINE) {
- def_service->state = CONNMAN_SERVICE_STATE_READY;
- __connman_notifier_leave_online(def_service->type);
- state_changed(def_service);
- }
+ downgrade_state(def_service);
}
static void switch_default_service(struct connman_service *default_service,
@@ -5898,8 +5894,7 @@ static int service_update_preferred_order(struct
connman_service *default_servic
unsigned int *tech_array;
int i;
- if (!default_service || default_service == new_service ||
- default_service->state != new_state)
+ if (!default_service || default_service == new_service)
return 0;
tech_array = connman_setting_get_uint_list("PreferredTechnologies");
@@ -6051,12 +6046,12 @@ static int service_indicate_state(struct
connman_service *service)
service->new_service = false;
- default_changed();
-
def_service = connman_service_get_default();
service_update_preferred_order(def_service, service, new_state);
+ default_changed();
+
__connman_service_set_favorite(service, true);
reply_pending(service, 0);
--
2.25.1
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list -- [email protected]
To unsubscribe send an email to [email protected]
------------------------------
End of connman Digest, Vol 67, Issue 10
***************************************