From 38a4ca1a6faaa3b7e52e7d3a96413021d144bee6 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 26 Sep 2017 09:33:33 -0400 Subject: [PATCH] use storageareas when outputting zone diag images --- src/zm_zone.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/zm_zone.cpp b/src/zm_zone.cpp index 53fb032fe..2bfdb404b 100644 --- a/src/zm_zone.cpp +++ b/src/zm_zone.cpp @@ -112,7 +112,7 @@ void Zone::Setup( if ( config.record_diag_images ) { static char diag_path[PATH_MAX] = ""; if ( ! diag_path[0] ) { - snprintf( diag_path, sizeof(diag_path), "%s/%d/diag-%d-poly.jpg", staticConfig.DIR_EVENTS.c_str(), monitor->Id(), id); + snprintf( diag_path, sizeof(diag_path), "%s/diag-%d-poly.jpg", monitor->getStorage()->Path(), id); } pg_image->WriteJpeg( diag_path ); } @@ -233,7 +233,7 @@ bool Zone::CheckAlarms( const Image *delta_image ) { if ( config.record_diag_images ) { static char diag_path[PATH_MAX] = ""; if ( ! diag_path[0] ) { - snprintf( diag_path, sizeof(diag_path), "%s/%d/diag-%d-%d.jpg", staticConfig.DIR_EVENTS.c_str(), monitor->Id(), id, 1 ); + snprintf( diag_path, sizeof(diag_path), "%s/diag-%d-%d.jpg", monitor->getStorage()->Path(), id, 1 ); } diff_image->WriteJpeg( diag_path ); } @@ -315,7 +315,7 @@ bool Zone::CheckAlarms( const Image *delta_image ) { if ( config.record_diag_images ) { static char diag_path[PATH_MAX] = ""; if ( !diag_path[0] ) { - snprintf( diag_path, sizeof(diag_path), "%s/%d/diag-%d-%d.jpg", staticConfig.DIR_EVENTS.c_str(), monitor->Id(), id, 2 ); + snprintf( diag_path, sizeof(diag_path), "%s/diag-%d-%d.jpg", monitor->getStorage()->Path(), id, 2 ); } diff_image->WriteJpeg( diag_path ); } @@ -525,7 +525,7 @@ bool Zone::CheckAlarms( const Image *delta_image ) { if ( config.record_diag_images ) { static char diag_path[PATH_MAX] = ""; if ( !diag_path[0] ) { - snprintf( diag_path, sizeof(diag_path), "%s/%d/diag-%d-%d.jpg", staticConfig.DIR_EVENTS.c_str(), monitor->Id(), id, 3 ); + snprintf( diag_path, sizeof(diag_path), "%s/diag-%d-%d.jpg", monitor->getStorage()->Path(), id, 3 ); } diff_image->WriteJpeg( diag_path ); } @@ -572,7 +572,7 @@ bool Zone::CheckAlarms( const Image *delta_image ) { if ( config.record_diag_images ) { static char diag_path[PATH_MAX] = ""; if ( !diag_path[0] ) { - snprintf( diag_path, sizeof(diag_path), "%s/%d/diag-%d-%d.jpg", staticConfig.DIR_EVENTS.c_str(), monitor->Id(), id, 4 ); + snprintf( diag_path, sizeof(diag_path), "%s/diag-%d-%d.jpg", monitor->getStorage()->Path(), id, 4 ); } diff_image->WriteJpeg( diag_path ); }