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 | |
parent | b15cd788ea79fcad160087bd4dd72548b94d7f14 (diff) |
better sanity check for music carts
Diffstat (limited to 'rhnop-server')
-rw-r--r-- | rhnop-server/nopsyncd.conf | 4 | ||||
-rw-r--r-- | rhnop-server/qlistener.lua | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/rhnop-server/nopsyncd.conf b/rhnop-server/nopsyncd.conf index ec7ba0a..a80d620 100644 --- a/rhnop-server/nopsyncd.conf +++ b/rhnop-server/nopsyncd.conf @@ -2,8 +2,8 @@ queue_name=/rhnop tcp_host=* tcp_port=2345 -dummy_now_cart=50001 -dummy_next_cart=50002 +music_carts_lo=400000 +music_carts_hi=499999 rddb_db=rivendell rddb_host=127.0.0.1 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 |