summaryrefslogtreecommitdiff
path: root/rhnop-server/qlistener.lua
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2011-03-30 16:58:45 (GMT)
committerChristian Pointner <equinox@helsinki.at>2011-03-30 16:58:45 (GMT)
commitff8a58b4af1a5e24bd45ee2695e1624143284d35 (patch)
treecddf1bcfb77a7d1667ec26a3faad3a3212be91e5 /rhnop-server/qlistener.lua
parentb15cd788ea79fcad160087bd4dd72548b94d7f14 (diff)
better sanity check for music carts
Diffstat (limited to 'rhnop-server/qlistener.lua')
-rw-r--r--rhnop-server/qlistener.lua3
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