use Monitor Id in path to diag images instead of monitor name as the name is a convenience link and not guaranteed to exist
parent
1791d3d5b7
commit
9f93bfc23b
src
|
@ -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 );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue