diff options
author | Christian Pointner <equinox@helsinki.at> | 2011-03-30 17:21:51 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2011-03-30 17:21:51 (GMT) |
commit | 8b055af834bb6de93519bbb0bff776ebb7fffe73 (patch) | |
tree | fcdf3439b5c45f39aa1182995d9b1d5bf06b1704 /rhnop-server | |
parent | 76ef7208410a5ada2ada9f8f16c08986fb095921 (diff) |
fixed handling of invalid carts
Diffstat (limited to 'rhnop-server')
-rw-r--r-- | rhnop-server/conf.lua | 9 | ||||
-rw-r--r-- | rhnop-server/debian/changelog | 6 | ||||
-rw-r--r-- | rhnop-server/qlistener.lua | 4 |
3 files changed, 18 insertions, 1 deletions
diff --git a/rhnop-server/conf.lua b/rhnop-server/conf.lua index 8e97650..4af34bb 100644 --- a/rhnop-server/conf.lua +++ b/rhnop-server/conf.lua @@ -32,4 +32,13 @@ for line in file:lines() do end file:close() +if conf.music_carts_lo == nil then + conf.music_carts_lo = 400000 +end +if conf.music_carts_hi == nil then + conf.music_carts_hi = 499999 +end +conf.music_carts_lo = tonumber(conf.music_carts_lo) +conf.music_carts_hi = tonumber(conf.music_carts_hi) + return conf diff --git a/rhnop-server/debian/changelog b/rhnop-server/debian/changelog index 4ae6174..29e913f 100644 --- a/rhnop-server/debian/changelog +++ b/rhnop-server/debian/changelog @@ -1,3 +1,9 @@ +rhnop-server (0.6) unstable; urgency=low + + * fixed handling of invalid carts. + + -- Christian Pointner <equinox@helsinki> Wed, 30 Mar 2011 19:36:22 +0200 + rhnop-server (0.5) unstable; urgency=low * better handling of invalid carts. diff --git a/rhnop-server/qlistener.lua b/rhnop-server/qlistener.lua index dcea7bb..6d18140 100644 --- a/rhnop-server/qlistener.lua +++ b/rhnop-server/qlistener.lua @@ -49,6 +49,8 @@ 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 + nowcart = tonumber(nowcart) + nowlen = tonumber(nowlen) 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) @@ -92,4 +94,4 @@ function main_loop() end handle_message(msg) end -end
\ No newline at end of file +end |