added CMD_QUIT to kill zms via command

This commit is contained in:
arjunrc 2016-01-29 09:58:50 -05:00
parent f85ed2d5b4
commit 47b2cdbb96
1 changed files with 8 additions and 0 deletions

View File

@ -1088,6 +1088,11 @@ void EventStream::processCommand( const CmdMsg *msg )
Debug( 1, "Got QUERY command, sending STATUS" );
break;
}
case CMD_QUIT :
{
Info ("User initiated exit - CMD_QUIT");
break;
}
default :
{
// Do nothing, for now
@ -1125,6 +1130,9 @@ void EventStream::processCommand( const CmdMsg *msg )
exit( -1 );
}
}
// quit after sending a status, if this was a quit request
if ((MsgCommand)msg->msg_data[0]==CMD_QUIT)
exit(0);
updateFrameRate( (double)event_data->frame_count/event_data->duration );
}