diff --git a/db/zm_create.sql.in b/db/zm_create.sql.in index 79eca0056..f9bb3866d 100644 --- a/db/zm_create.sql.in +++ b/db/zm_create.sql.in @@ -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 '', diff --git a/db/zm_update-1.31.32.sql b/db/zm_update-1.31.32.sql new file mode 100644 index 000000000..781fce1fc --- /dev/null +++ b/db/zm_update-1.31.32.sql @@ -0,0 +1,3 @@ +ALTER TABLE Monitors MODIFY TotalEventDiskSpace BIGINT default NULL; +ALTER TABLE Monitors MODIFY Method VARCHAR(16) default NULL; + diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index 9f0b05d31..87cda8c80 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -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++; diff --git a/version b/version index e5f37b4d8..71736e954 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.31.31 +1.31.32