Merge lp://qastaging/~charlesk/indicator-datetime/lp-1424966-fix-ecanceled-errno-rtm-14.09 into lp://qastaging/indicator-datetime/rtm-14.09

Proposed by Charles Kerr
Status: Merged
Approved by: Ted Gould
Approved revision: 397
Merged at revision: 397
Proposed branch: lp://qastaging/~charlesk/indicator-datetime/lp-1424966-fix-ecanceled-errno-rtm-14.09
Merge into: lp://qastaging/indicator-datetime/rtm-14.09
Diff against target: 97 lines (+35/-24)
1 file modified
src/clock-live.cpp (+35/-24)
To merge this branch: bzr merge lp://qastaging/~charlesk/indicator-datetime/lp-1424966-fix-ecanceled-errno-rtm-14.09
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
Review via email: mp+250871@code.qastaging.launchpad.net

Commit message

Avoid ECANCELED errors in calls to timerfd_settime()

Description of the change

=== Change Description

timerfd_settime() can fail with ECANCELED if the system's monotonic offset has changed since the timer was created with timerfd_create(). This patch avoids that case by using a new timerfd for each call to timerfd_settime().

* Extract the timer+poll cleanup code from Impl::~Impl into new private method unset_timer() called by ~Impl() and now also by reset_timer() as part of replacing the old timerfd with a new one

* Moved timerfd_create() and g_unix_fd_add() calls from Impl::Impl() into reset_timer() to complete the process of replacing the old timerfd with a new one

* Demoted condition logging from a g_message() to a g_debug() because it happens too frequently for a g_message()

=== Checklist

> Are there any related MPs required for this MP to build/function as expected? Please list.

No

> Is your branch in sync with latest trunk? (e.g. bzr pull lp:trunk -> no changes)

Yes

> Did the code build without warnings?

Yes

> Did the tests run successfully?

Yes

> Did you perform an exploratory manual test run of your code change and any related functionality?

Yes

> If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?

N/A

> What device (or emulator) has your component test plan been executed successfully on?

krillin 14.10 r244

> What manual tests are relevant for this MP?

indicator-datetime/manual-time

> Did you include a link to the MR Review Checklist Template to make your reviewer's life easier?

https://wiki.ubuntu.com/Process/Merges/Checklists/indicator-datetime

To post a comment you must log in.
Revision history for this message
Ted Gould (ted) wrote :

Okay, this makes a lot more sense now that I realize it isn't for alarms. :-) My fault.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches