chiark / gitweb /
Fix a race between track startup and scratching. Basically if the
authorRichard Kettlewell <rjk@greenend.org.uk>
Mon, 3 Mar 2008 22:56:22 +0000 (22:56 +0000)
committerRichard Kettlewell <rjk@greenend.org.uk>
Mon, 3 Mar 2008 22:56:22 +0000 (22:56 +0000)
commit819f5988d32fdaa25588018e71227961529bd23a
tree34e76de2b13e23b375ba6465d60fd4432d84252e
parent0d350ff0f9e835fe30e599d437374fecf5e3bd44
Fix a race between track startup and scratching.  Basically if the
scratch was too soon then SM_CANCEL would arrive at the speaker before
SM_PLAY, leaving the speaker thinking this was a queue removal rather
than a scratch, and therefore not sending a response.

The fix is to respond to _all_ SM_CANCELs whatever the speaker thinks
they are, and disorderd to always check the ID against the playing
track.  The responses are distinguished, but the server no longer uses
this information.
lib/speaker-protocol.h
server/play.c
server/speaker.c