assume source=monitor when a monitor_id is specified

This commit is contained in:
Isaac Connor 2017-08-24 10:13:46 -04:00
parent a4cf47b5c3
commit 48e9e12063
1 changed files with 2 additions and 0 deletions

View File

@ -121,6 +121,8 @@ int main( int argc, const char *argv[] ) {
strncpy( format, value, sizeof(format) ); strncpy( format, value, sizeof(format) );
} else if ( !strcmp( name, "monitor" ) ) { } else if ( !strcmp( name, "monitor" ) ) {
monitor_id = atoi( value ); monitor_id = atoi( value );
if ( source == ZMS_UNKNOWN )
source = ZMS_MONITOR;
} else if ( !strcmp( name, "time" ) ) { } else if ( !strcmp( name, "time" ) ) {
event_time = atoi( value ); event_time = atoi( value );
} else if ( !strcmp( name, "event" ) ) { } else if ( !strcmp( name, "event" ) ) {