Changeset 841

Show
Ignore:
Timestamp:
08/24/07 15:01:11 (17 months ago)
Author:
james
Message:

needs more error handling (hopefully fix #141)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/modules/system.tcl

    r832 r841  
    121121        bMotion_putloglev 4 * "bMotion_is_active_enough $channel" 
    122122 
    123         set last_event $bMotionLastEvent($channel) 
     123        set last_event 0 
     124        catch { 
     125                set last_event $bMotionLastEvent($channel) 
     126        } 
     127        if {$last_event == 0} { 
     128                bMotion_putloglev d * "last event info for $channel not available" 
     129                # assume we're ok 
     130                return 1 
     131        } 
     132 
    124133        bMotion_putloglev 3 * "last event for $channel was $last_event" 
    125134  if {([clock seconds] - $last_event) < ([expr $bMotionInfo(maxIdleGap) * 60])} {