On 2015-06-22 14:46, Patrik Flykt wrote:
> On Fri, 2015-06-19 at 19:22 -0700, Naveen Singh wrote:
>> I realized that timers used in dhcp plugin use monotonic timers which does
>> not progress during suspend duration of device. Because of this the devices
>> which are sleepy in nature never get to renew IP address and causes lot of
>> communication failures.
> 
> This affects all timers set by ConnMan, so a generic fix would be of
> interest. Hasn't this been implemented in some version of glib already?

GLib's monotonic timer is documented as "It may or may not continue to
tick during times where the machine is suspended". On Linux and BSDs it
uses bare clock_gettime(CLOCK_MONOTONIC), which isn't suspend aware in
Linux (CLOCK_BOOTTIME is supposed to be used as drop-in replacement for
such cases), but seems to be on at least OpenBSD.

>> I have an implementation which in stead of using CLOCK_MONOTONIC uses
>> CLOCK_BOOTTIME_ALARM. This implementation is based on creating a timer fd
>> and hooking that fd to a GSource which in turn is attached to GMainLoop.
>>
>> Is community open in accepting a patch for this? If yes I could send the
>> patch for review?
> 
> I'd definitely want this kind of thing being fixed in glib. How
> ugly/intrusive is your patch?
> 
> Cheers,
> 
>       Patrik
> 
> _______________________________________________
> connman mailing list
> connman@connman.net
> https://lists.connman.net/mailman/listinfo/connman
> 

-- 
Mit freundlichen Grüßen, / Best Regards,
Sven Schwedas
Systemadministrator
TAO Beratungs- und Management GmbH | Lendplatz 45 | A - 8020 Graz
Mail/XMPP: sven.schwe...@tao.at | +43 (0)680 301 7167
http://software.tao.at

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

Reply via email to