Author: andy
Date: Mon Jan 28 10:36:12 2008
New Revision: 1659
URL: http://svn.slimdevices.com?rev=1659&root=Jive&view=rev
Log:
Bug 6828, support a relative firmware URL from SC
Modified:
branches/7.0/jive/src/pkg/jive_squeezeboxjive/share/applets/SetupFirmwareUpgrade/SetupFirmwareUpgradeMeta.lua
Modified:
branches/7.0/jive/src/pkg/jive_squeezeboxjive/share/applets/SetupFirmwareUpgrade/SetupFirmwareUpgradeMeta.lua
URL:
http://svn.slimdevices.com/branches/7.0/jive/src/pkg/jive_squeezeboxjive/share/applets/SetupFirmwareUpgrade/SetupFirmwareUpgradeMeta.lua?rev=1659&root=Jive&r1=1658&r2=1659&view=diff
==============================================================================
---
branches/7.0/jive/src/pkg/jive_squeezeboxjive/share/applets/SetupFirmwareUpgrade/SetupFirmwareUpgradeMeta.lua
(original)
+++
branches/7.0/jive/src/pkg/jive_squeezeboxjive/share/applets/SetupFirmwareUpgrade/SetupFirmwareUpgradeMeta.lua
Mon Jan 28 10:36:12 2008
@@ -39,9 +39,19 @@
log:warn(err)
return
end
+
+ if not meta.player then
+ log:warn("Firmware upgrade response but not
connected to server")
+ return
+ end
-- store firmware upgrade url
- if chunk.data.firmwareUrl then
+ -- Bug 6828, use a relative URL from SC to handle
dual-homed servers
+ if chunk.data.relativeFirmwareUrl then
+ local ip, port =
meta.player.slimServer:getIpPort()
+ upgradeUrl[1] = 'http://' .. ip .. ':' .. port
.. chunk.data.relativeFirmwareUrl
+ log:info("Relative Firmware URL=",
upgradeUrl[1])
+ elseif chunk.data.firmwareUrl then
upgradeUrl[1] = chunk.data.firmwareUrl
log:info("Firmware URL=", upgradeUrl[1])
end
@@ -52,9 +62,7 @@
local applet =
appletManager:loadApplet("SetupFirmwareUpgrade")
applet:forceUpgrade(upgradeUrl[1])
- if meta.player then
-
meta.player.slimServer.comet:unsubscribe('/slim/firmwarestatus/' ..
meta.player.id)
- end
+
meta.player.slimServer.comet:unsubscribe('/slim/firmwarestatus/' ..
meta.player.id)
end
end
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins