On 5/26/11 1:58 AM, Daniel Wagner wrote: > On Wed, May 25, 2011 at 09:53:12AM -0700, Grant Erickson wrote: >> On 5/25/11 6:46 AM, Daniel Wagner wrote: >>> I was wondering why the Manager object does not send a "offline" >>> StateChanged signal when I disconnect my only online service (in my >>> case ethernet). >>> >>> ... >>> >>> From the log files I saw that >>> __connman_notifier_connect() is called just in front of the >>> __connman_notifier_disconnect(). __connman_notifer_connect() will >>> increase the count of all the technologies before it decreases it in >>> __connman_notifier_disconnect() again. So the this is more or less a >>> no op. Therefore I never see StateChaned from online to offline. >>> >>> ... >>> >>> __connman_notifier_connect() is called from >>> __connman_service_indicate_state() because state is >>> CONNMAN_SERVICE_STATE_READY which comes from the IPv6 >>> configuration. So I guess this is just another reason for fixing the >>> service state machine. >> >> Daniel, >> >> This patch, which I need to resubmit today with Samuel's recommendations, >> largely addresses this issue: >> >> http://lists.connman.net/pipermail/connman/2011-May/004725.html >> >> It, coupled with the following patch, should limit and/or eliminate these >> sorts of issues until such time as the service state machine receives a more >> thorough overhaul: >> >> http://lists.connman.net/pipermail/connman/2011-May/004795.html > > Your patch addresses the READY state. My problem is the DISCONNECTED > state. Still I tested your patch (v2) but as expected it doesn't > change anything for me. Maybe it's now the time for refactoring the > state machine. I'll see several artifacts on the Session API which > have the origin from the state machine. Let's see what I can do about > it :)
Daniel, Yes, it turns out that, as predicted by Samuel, a DHCP lease configuration change (and likely a change from DHCP to static configuration) does not get handled correctly either. So, a service state machine refactoring may be unavoidable at this point. Best, Grant _______________________________________________ connman mailing list [email protected] http://lists.connman.net/listinfo/connman
