chiark
/
gitweb
/
~mdw
/
disorder
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f4f5a47
)
set DISORDER_PLAYING bit off event log properly
author
Richard Kettlewell
<rjk@greenend.org.uk>
Mon, 1 Oct 2007 15:09:22 +0000
(16:09 +0100)
committer
Richard Kettlewell
<rjk@greenend.org.uk>
Mon, 1 Oct 2007 15:09:22 +0000
(16:09 +0100)
lib/eclient.c
patch
|
blob
|
blame
|
history
diff --git
a/lib/eclient.c
b/lib/eclient.c
index e33cb7cce41024b2a9a936c0ab1cc8df457f96e5..e5b723de7f8b824cbf2201f82a45a93d07d1969f 100644
(file)
--- a/
lib/eclient.c
+++ b/
lib/eclient.c
@@
-1292,6
+1292,9
@@
static const struct {
{ DISORDER_PLAYING_ENABLED, "enable_play", "disable_play" },
{ DISORDER_RANDOM_ENABLED, "enable_random", "disable_random" },
{ DISORDER_TRACK_PAUSED, "pause", "resume" },
{ DISORDER_PLAYING_ENABLED, "enable_play", "disable_play" },
{ DISORDER_RANDOM_ENABLED, "enable_random", "disable_random" },
{ DISORDER_TRACK_PAUSED, "pause", "resume" },
+ { DISORDER_PLAYING, "playing", "completed" },
+ { DISORDER_PLAYING, 0, "scratched" },
+ { DISORDER_PLAYING, 0, "failed" },
};
#define NSTATES (int)(sizeof statestrings / sizeof *statestrings)
};
#define NSTATES (int)(sizeof statestrings / sizeof *statestrings)
@@
-1300,10
+1303,10
@@
static void logentry_state(disorder_eclient *c,
int n;
for(n = 0; n < NSTATES; ++n)
int n;
for(n = 0; n < NSTATES; ++n)
- if(!strcmp(vec[0], statestrings[n].enable)) {
+ if(
statestrings[n].enable &&
!strcmp(vec[0], statestrings[n].enable)) {
c->statebits |= statestrings[n].bit;
break;
c->statebits |= statestrings[n].bit;
break;
- } else if(!strcmp(vec[0], statestrings[n].disable)) {
+ } else if(
statestrings[n].disable &&
!strcmp(vec[0], statestrings[n].disable)) {
c->statebits &= ~statestrings[n].bit;
break;
}
c->statebits &= ~statestrings[n].bit;
break;
}