From d754239a51673d983f79b3b6dd04fd823f63dcd8 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 24 Sep 2015 09:57:58 -0400 Subject: [PATCH] add debug statements for when LastWriteTime is not defined. --- scripts/zmwatch.pl.in | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/zmwatch.pl.in b/scripts/zmwatch.pl.in index 01d15e815..ee7e1b60d 100644 --- a/scripts/zmwatch.pl.in +++ b/scripts/zmwatch.pl.in @@ -93,8 +93,16 @@ while( 1 ) { # Check we have got an image recently my $image_time = zmGetLastWriteTime( $monitor ); - next if ( !defined($image_time) ); # Can't read from shared data - next if ( !$image_time ); # We can't get the last capture time so can't be sure it's died. + if ( !defined($image_time) ) { + # Can't read from shared data + Debug( "LastWriteTime is not defined." ); + next; + } + if ( !$image_time ) { + # We can't get the last capture time so can't be sure it's died. + Debug( "LastWriteTime is = $image_time." ); + next; + } my $max_image_delay = ( $monitor->{MaxFPS} &&($monitor->{MaxFPS}>0)