Allow Method in Monitors to be NULL

This commit is contained in:
Isaac Connor 2018-02-02 10:31:55 -05:00
parent 68521aa0d4
commit 868e17a414
4 changed files with 7 additions and 4 deletions

View File

@ -562,7 +562,7 @@ CREATE TABLE `Monitors` (
`V4LMultiBuffer` tinyint(1) unsigned,
`V4LCapturesPerFrame` tinyint(3) unsigned,
`Protocol` varchar(16),
`Method` varchar(16) NOT NULL default '',
`Method` varchar(16) default '',
`Host` varchar(64),
`Port` varchar(8) NOT NULL default '',
`SubPath` varchar(64) NOT NULL default '',

3
db/zm_update-1.31.32.sql Normal file
View File

@ -0,0 +1,3 @@
ALTER TABLE Monitors MODIFY TotalEventDiskSpace BIGINT default NULL;
ALTER TABLE Monitors MODIFY Method VARCHAR(16) default NULL;

View File

@ -1937,7 +1937,7 @@ int Monitor::LoadLocalMonitors( const char *device, Monitor **&monitors, Purpose
}
Debug( 1, "Got %d for v4l_captures_per_frame", v4l_captures_per_frame );
col++;
const char *method = dbrow[col]; col++;
const char *method = dbrow[col] ? dbrow[col] : ""; col++;
int width = atoi(dbrow[col]); col++;
int height = atoi(dbrow[col]); col++;
@ -2438,7 +2438,7 @@ int Monitor::LoadFfmpegMonitors( const char *file, Monitor **&monitors, Purpose
const char *linked_monitors = dbrow[col] ? dbrow[col] : ""; col++;
const char *path = dbrow[col]; col++;
const char *method = dbrow[col]; col++;
const char *method = dbrow[col] ? dbrow[col] : ""; col++;
const char *options = dbrow[col] ? dbrow[col] : ""; col++;
int width = atoi(dbrow[col]); col++;

View File

@ -1 +1 @@
1.31.31
1.31.32