Author: titmuss
Date: Mon May 12 08:30:54 2008
New Revision: 2438
URL: http://svn.slimdevices.com?rev=2438&root=Jive&view=rev
Log:
[EMAIL PROTECTED] (orig r2435): bklaas | 2008-05-08 21:38:06 +0100
Bug: 8093
Description: apparently SLT ignores translating anything in ALLCAPS, so making
ADD/PLAY add/play
[EMAIL PROTECTED] (orig r2436): titmuss | 2008-05-12 14:26:26 +0100
Bug: 7120
Description:
Fix windows arp lookup on windows. This was causing an infinite loop when
starting squeezeplay on windows.
Async processes do not work on windows, so any Process call is blocking, and
the results return immediately.
[EMAIL PROTECTED] (orig r2437): titmuss | 2008-05-12 16:03:10 +0100
Bug: 7120
Description:
Fixes for unix.
Modified:
7.2/trunk/ (props changed)
7.2/trunk/squeezeplay/src/squeezeplay/share/jive/net/NetworkThread.lua
7.2/trunk/squeezeplay/src/squeezeplay/share/jive/net/Process.lua
7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/strings.txt
Propchange: 7.2/trunk/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Mon May 12 08:30:54 2008
@@ -1,5 +1,5 @@
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.0/trunk:2409
-bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.1/trunk:2428
+bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.1/trunk:2437
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:2013
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/SN:1083
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/scrolling:1378
Modified: 7.2/trunk/squeezeplay/src/squeezeplay/share/jive/net/NetworkThread.lua
URL:
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay/share/jive/net/NetworkThread.lua?rev=2438&root=Jive&r1=2437&r2=2438&view=diff
==============================================================================
--- 7.2/trunk/squeezeplay/src/squeezeplay/share/jive/net/NetworkThread.lua
(original)
+++ 7.2/trunk/squeezeplay/src/squeezeplay/share/jive/net/NetworkThread.lua Mon
May 12 08:30:54 2008
@@ -32,6 +32,7 @@
local _assert, tostring, table, ipairs, pairs, pcall, select, type = _assert,
tostring, table, ipairs, pairs, pcall, select, type
local io = require("io")
+local os = require("os")
local socket = require("socket")
local string = require("string")
local table = require("jive.utils.table")
@@ -339,20 +340,28 @@
function arp(self, host, sink)
local arp = ""
- -- XXXX this won't work on windows
-
- local proc = Process(self, "arp " .. host)
+ local cmd = "arp " .. host
+ if string.match(os.getenv("OS") or "", "Windows") then
+ cmd = "arp -a " .. host
+ end
+
+ local proc = Process(self, cmd)
proc:read(function(chunk, err)
- if err then
- return sink(err)
- end
-
- if chunk then
- arp = arp .. chunk
- else
- sink(string.match(arp,
"%x%x:%x%x:%x%x:%x%x:%x%x:%x%x"))
- end
- end)
+ if err then
+ return sink(err)
+ end
+
+ if chunk then
+ arp = arp .. chunk
+ else
+ local mac = string.match(arp,
"%x%x[:-]%x%x[:-]%x%x[:-]%x%x[:-]%x%x[:-]%x%x")
+ if mac then
+ mac = string.gsub(mac,
"-", ":")
+ end
+
+ sink(mac)
+ end
+ end)
end
Modified: 7.2/trunk/squeezeplay/src/squeezeplay/share/jive/net/Process.lua
URL:
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay/share/jive/net/Process.lua?rev=2438&root=Jive&r1=2437&r2=2438&view=diff
==============================================================================
--- 7.2/trunk/squeezeplay/src/squeezeplay/share/jive/net/Process.lua (original)
+++ 7.2/trunk/squeezeplay/src/squeezeplay/share/jive/net/Process.lua Mon May 12
08:30:54 2008
@@ -2,7 +2,9 @@
local oo = require("loop.base")
local io = require("io")
+local os = require("os")
local coroutine = require("coroutine")
+local string = require("string")
local Task = require("jive.ui.Task")
@@ -32,6 +34,16 @@
self._status = "dead"
return
+ end
+
+ if string.match(os.getenv("OS") or "", "Windows") then
+ -- blocking on Windows!
+ local chunk = self.fh:read("*a")
+ self.fh:close()
+
+ sink(chunk)
+ sink(nil)
+ return
end
local task = Task("prog:" .. self.prog,
Modified:
7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/strings.txt
URL:
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/strings.txt?rev=2438&root=Jive&r1=2437&r2=2438&view=diff
==============================================================================
---
7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/strings.txt
(original)
+++
7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/strings.txt
Mon May 12 08:30:54 2008
@@ -16,7 +16,7 @@
BSP_SCREEN_LOCKED_HELP
DA For at låse op, tryk ADD og PLAY på samme tid.
DE Drücken Sie zum Aufheben der Sperre gleichzeitig ADD und PLAY.
- EN To unlock, press the ADD and PLAY buttons at the same time.
+ EN To unlock, press the add and play buttons at the same time.
ES Para desbloquear, pulse los botones ADD y PLAY simultáneamente.
FR Pour déverrouiller, appuyez sur les boutons ADD et PLAY
simultanément.
IT Per sbloccare premere contemporaneamente i pulsanti ADD e PLAY.
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins