summaryrefslogtreecommitdiff
path: root/rhnop-server/qlistener.lua
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2011-03-30 17:21:51 (GMT)
committerChristian Pointner <equinox@helsinki.at>2011-03-30 17:21:51 (GMT)
commit8b055af834bb6de93519bbb0bff776ebb7fffe73 (patch)
treefcdf3439b5c45f39aa1182995d9b1d5bf06b1704 /rhnop-server/qlistener.lua
parent76ef7208410a5ada2ada9f8f16c08986fb095921 (diff)
fixed handling of invalid carts
Diffstat (limited to 'rhnop-server/qlistener.lua')
-rw-r--r--rhnop-server/qlistener.lua4
1 files changed, 3 insertions, 1 deletions
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