Author: bklaas
Date: Thu Jan 14 13:12:11 2010
New Revision: 8338

URL: http://svn.slimdevices.com/jive?rev=8338&view=rev
Log:
Bug: 14870
Description: make sure self.alarmInProgress is set before restarting the alarm 
timer in sledgehammer

Modified:
    
7.4/trunk/squeezeplay/src/squeezeplay/share/applets/AlarmSnooze/AlarmSnoozeApplet.lua

Modified: 
7.4/trunk/squeezeplay/src/squeezeplay/share/applets/AlarmSnooze/AlarmSnoozeApplet.lua
URL: 
http://svn.slimdevices.com/jive/7.4/trunk/squeezeplay/src/squeezeplay/share/applets/AlarmSnooze/AlarmSnoozeApplet.lua?rev=8338&r1=8337&r2=8338&view=diff
==============================================================================
--- 
7.4/trunk/squeezeplay/src/squeezeplay/share/applets/AlarmSnooze/AlarmSnoozeApplet.lua
 (original)
+++ 
7.4/trunk/squeezeplay/src/squeezeplay/share/applets/AlarmSnooze/AlarmSnoozeApplet.lua
 Thu Jan 14 13:12:11 2010
@@ -38,7 +38,7 @@
        jnt:subscribe(self)
        self.alarmTone = "applets/AlarmSnooze/alarm.mp3"
        
-       self.alarmInProgress = 'none';
+       self.alarmInProgress = nil
 
        local timeToAlarm
        local startTimer = false
@@ -127,7 +127,7 @@
                                self:getSettings()['alarmNext'] = false
                                self:storeSettings()
                                self:_setWakeupTime('none')
-                               self.alarmInProgress = 'none'
+                               self.alarmInProgress = nil
                                -- might want to qualify whether or not to stop 
this timer dependent upon whether it's already running.
                                -- for now just log the information
                                if self.RTCAlarmTimer:isRunning() then
@@ -186,7 +186,7 @@
        --debug.dump(status)
 
        log:warn('alarm_sledgehammerRearm(', caller,'): ', 
self.alarmInProgress, ' alarm in progress - audioState is ', status.audioState)
-       if status.audioState ~= 1 then
+       if self.alarmInProgress and status.audioState ~= 1 then
                hammer = true
        end
 
@@ -279,7 +279,7 @@
        log:info('notify_serverDisconnected: ', server, ' is now disconnected')
 
        -- blindly check state here irrespective of which server caused this 
notification
-       if self.alarmInProgress ~= 'none' and self.alarmInProgress ~= 'rtc' then
+       if self.alarmInProgress and self.alarmInProgress ~= 'rtc' then
                if not self.localPlayer:isConnected() then
                        log:warn('notify_serverDisconnected: ', server, ' - 
while server alarm in progress! state ', self.alarmInProgress, ' triggering 
fallback alarm!')
                        self:openAlarmWindow('rtc')
@@ -490,7 +490,7 @@
                        if self.decodeStatePoller:isRunning() then
                                self.decodeStatePoller:stop()
                        end
-                        self.alarmInProgress = 'none'
+                        self.alarmInProgress = nil
                        self.alarmWindow = nil
                 end
         )
@@ -512,7 +512,7 @@
                end
        end
        
-       self.alarmInProgress = 'none'
+       self.alarmInProgress = nil
        self:_stopTimer()
        self.alarmWindow:playSound("WINDOWHIDE")
        self:_hideAlarmWindow()

_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/jive-checkins

Reply via email to