From 9f93bfc23bf1175b03243e95ee9c86650abf4f26 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 25 Sep 2017 18:45:58 -0400 Subject: [PATCH] use Monitor Id in path to diag images instead of monitor name as the name is a convenience link and not guaranteed to exist --- src/zm_zone.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/zm_zone.cpp b/src/zm_zone.cpp index 7fa2cbf29..53fb032fe 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/%s/diag-%d-poly.jpg", staticConfig.DIR_EVENTS.c_str(), monitor->Name(), id); + snprintf( diag_path, sizeof(diag_path), "%s/%d/diag-%d-poly.jpg", staticConfig.DIR_EVENTS.c_str(), monitor->Id(), 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/%s/diag-%d-%d.jpg", staticConfig.DIR_EVENTS.c_str(), monitor->Name(), id, 1 ); + snprintf( diag_path, sizeof(diag_path), "%s/%d/diag-%d-%d.jpg", staticConfig.DIR_EVENTS.c_str(), monitor->Id(), id, 1 ); } diff_image->WriteJpeg( diag_path ); }