diff options
author | Christian Pointner <equinox@helsinki.at> | 2011-03-30 16:58:45 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2011-03-30 16:58:45 (GMT) |
commit | ff8a58b4af1a5e24bd45ee2695e1624143284d35 (patch) | |
tree | cddf1bcfb77a7d1667ec26a3faad3a3212be91e5 /rhnop-server/qlistener.lua | |
parent | b15cd788ea79fcad160087bd4dd72548b94d7f14 (diff) |
better sanity check for music carts
Diffstat (limited to 'rhnop-server/qlistener.lua')
-rw-r--r-- | rhnop-server/qlistener.lua | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/rhnop-server/qlistener.lua b/rhnop-server/qlistener.lua index 0371a02..dcea7bb 100644 --- a/rhnop-server/qlistener.lua +++ b/rhnop-server/qlistener.lua @@ -49,8 +49,7 @@ function handle_message(msg) if not timestamp or not nowcart or not nowlen or not nextcart or not nextlen then io.stderr:write("ignoring malformed message\n") else - -- TODO better sanity checks: is now info new or just next? - if last_cart ~= nowcart and nowcart ~= conf.dummy_now_cart then + if last_cart ~= nowcart and nowcart >= conf.music_carts_lo and nowcart <= conf.music_carts_hi and nowlen > 0 then last_cart = nowcart handle_now(timestamp, nowcart, nowlen) end |