zmu --image warning
Posted: Mon Dec 13, 2021 10:56 pm
Hello,
I have a cronjob that periodically grabs the last image captured and saves it & this job has been littering the logs with the following warning:
This is coming from line 1178 of zm_monitor.cpp of zoneminder 1.36.11
My script uses to get the last image captured and this is valid based upon zmu(8) --image [image_index] - Write captured image to disk as <monitor_name>.jpg, last image captured or specified ring buffer index if given. But clearly someone didn't tell zm_monitor.cpp that it should expect to see -1 as an index:
--Larry
I have a cronjob that periodically grabs the last image captured and saves it & this job has been littering the logs with the following warning:
Code: Select all
WAR Invalid index -1 passed. image_buffer_count = 3
This is coming from line 1178 of zm_monitor.cpp of zoneminder 1.36.11
My script uses
Code: Select all
zmu --image
Code: Select all
if ( function & ZMU_IMAGE ) {
if ( verbose ) {
if ( image_idx == -1 )
printf("Dumping last image captured to Monitor%d.jpg", monitor->Id());
else
printf("Dumping buffer image %d to Monitor%d.jpg", image_idx, monitor->Id());
if ( scale != -1 )
printf(", scaling by %d%%", scale);
printf("\n");
}
monitor->GetImage(image_idx, scale>0?scale:100);
}