4 Commits

Author SHA1 Message Date
John Grossman
464a98151c Timesync: Improve logging and reject bad resps.
+ Improve the state machine logging in the time server so we have some
  visibility into why it is doing the things it is doing.
+ Also, reject sync responses we receive from IP addresses which are
  not our current master.  Given the poor quality of the AAH WiFi
  network right now, we are thrashing a whole lot and can actually get
  into a state where this starts to happen.  Its easy to check and
  reject invalid responses, so do so.

Change-Id: I2318be3998c7f9f77bb25588d935f54394976875
2011-10-31 16:34:24 -07:00
John Grossman
9684be35bf AAH: Fix a bug in the master election state machine.
Client's of Masters who disappear before the client has processed even
one timesync response should not enter the Ronin state.  Since they
have never synced to the old Master's timeline, by becoming Ronin they
run the risk of defeating other new Ronin's in the master election,
even though they don't have any idea what time it is on the old
Master's timeline and therefore are unsuitable to serve as the new
Master.  Instead, they should transition to the Initial state, where
other new Ronins (who do know what time it is) have the chance to step
in and serve as master of the old timeline.  If there are no other
Ronin who can do the job, then the old timeline is dead and by
transitioning to Initial, a new one will be generated.

Change-Id: Iaa95313bfe68a971be2764e252ebf4b34313013d
Signed-off-by: John Grossman <johngro@google.com>
2011-10-28 10:14:51 -04:00
John Grossman
10bd439022 Reintroduce a line of code which disappeared during reformatting.
Reintroduce a line of code which went missing during a global reformat for style
reasons.

Change-Id: I9f8f8a88cd9e490197963a1287555afc2906ea62
2011-10-28 10:14:48 -04:00
Mike J. Chen
d8dbdf7ead Add service/aah_timesrv
This is a common time service used by Tungsten for synchronizing
distributed playback.

This is a squashed merge from master-tungsten of the following changes:

commit 43be3231034ff8537fdd84422a7954780038671f
Author: John Grossman <johngro@google.com>
Date:   Mon Jun 27 18:59:12 2011 -0700

    Move libaah_rtp over from the vendor directory.

    Also move factor PipeEvent out into utils.

    Change-Id: Id3877c66efe22d771cf3ef4877107e431b828e37

commit a148e2674b1d3cb73289b82b85c333f0a66824a9
Author: John Grossman <johngro@google.com>
Date:   Mon Jun 20 17:02:24 2011 -0700

    Move the A@H time service into frameworks/base

    Change-Id: I5c570cde70e8931e205516cb33517585804ce841

commit 86c94c7d6780fcfa4e1146325706fb78bc30544c
Author: Jason Simmons <jsimmons@google.com>
Date:   Mon Jun 20 15:44:31 2011 -0700

    Update the service manager UID table to match the new name of the common clock service

    Change-Id: I5a65e84e8dff743c69d182e9851e58fc68791564

commit 6ab14c34be8c1b10b1258bdebbba1e52743ff5b9
Author: Jason Simmons <jsimmons@google.com>
Date:   Fri Jun 3 18:19:40 2011 -0700

    Add tungsten_timesrv to init.rc

    Change-Id: I851aa990612440e1df1af992ed6e4d64b54a4951

Change-Id: Id832a0a00d447aa562bb7476902799bfa5bbda8d
Signed-off-by: Mike J. Chen <mjchen@google.com>
Signed-off-by: John Grossman <johngro@google.com>
2011-10-28 10:14:48 -04:00