diff --git a/distros/ubuntu1204/changelog b/distros/ubuntu1204/changelog index 2dfc8b63c..09571c21b 100644 --- a/distros/ubuntu1204/changelog +++ b/distros/ubuntu1204/changelog @@ -1,3 +1,11 @@ +zoneminder (1.28.1+1-trusty-SNAPSHOT2015071501) trusty; urgency=medium + + * fix for issue #586 and #932 + * fix for db not being upgraded + * version upgraded to .100 + + -- Isaac Connor Wed, 15 Jul 2015 11:56:28 -0400 + zoneminder (1.28.1+1-trusty-SNAPSHOT2015030201) trusty; urgency=medium * maybe fix for RTSP Basic Auth diff --git a/distros/ubuntu1504/changelog b/distros/ubuntu1504/changelog index e53dd0203..47a2032bb 100644 --- a/distros/ubuntu1504/changelog +++ b/distros/ubuntu1504/changelog @@ -1,3 +1,11 @@ +zoneminder (1.28.1+1-vivid-SNAPSHOT2015071501) vivid; urgency=medium + + * fix for issue #586 and #932 + * fix for db not being upgraded + * version upgraded to .100 + + -- Isaac Connor Wed, 15 Jul 2015 11:56:28 -0400 + zoneminder (1.28.1+1-vivid-SNAPSHOT2015070402) vivid; urgency=medium * Correct PRIMARY KEY update code on States table diff --git a/distros/ubuntu1504_cmake_split_packages/zoneminder-core.install b/distros/ubuntu1504_cmake_split_packages/zoneminder-core.install index 97aa76556..bd0a03bc2 100644 --- a/distros/ubuntu1504_cmake_split_packages/zoneminder-core.install +++ b/distros/ubuntu1504_cmake_split_packages/zoneminder-core.install @@ -2,4 +2,4 @@ etc/zm usr/bin usr/share/polkit-1/actions usr/share/polkit-1/rules.d -usr/share/man +usr/share/man/man8 diff --git a/distros/ubuntu1504_cmake_split_packages/zoneminder-core.postinst.debhelper b/distros/ubuntu1504_cmake_split_packages/zoneminder-core.postinst.debhelper deleted file mode 100644 index 888b155f4..000000000 --- a/distros/ubuntu1504_cmake_split_packages/zoneminder-core.postinst.debhelper +++ /dev/null @@ -1,15 +0,0 @@ -# Automatically added by dh_installinit -# In case this system is running systemd, we need to ensure that all -# necessary tmpfiles (if any) are created before starting. -if [ -d /run/systemd/system ] ; then - systemd-tmpfiles --create /usr/lib/tmpfiles.d/zoneminder.conf >/dev/null || true -fi -# End automatically added section -# Automatically added by dh_installinit -if [ -x "/etc/init.d/zoneminder" ]; then - update-rc.d zoneminder defaults >/dev/null -fi -if [ -x "/etc/init.d/zoneminder" ] || [ -e "/etc/init/zoneminder.conf" ]; then - invoke-rc.d zoneminder start || exit $? -fi -# End automatically added section diff --git a/distros/ubuntu1504_cmake_split_packages/zoneminder-core.postrm.debhelper b/distros/ubuntu1504_cmake_split_packages/zoneminder-core.postrm.debhelper deleted file mode 100644 index 19b291b3f..000000000 --- a/distros/ubuntu1504_cmake_split_packages/zoneminder-core.postrm.debhelper +++ /dev/null @@ -1,18 +0,0 @@ -# Automatically added by dh_installinit -if [ "$1" = "purge" ] ; then - update-rc.d zoneminder remove >/dev/null -fi - - -# In case this system is running systemd, we make systemd reload the unit files -# to pick up changes. -if [ -d /run/systemd/system ] ; then - systemctl --system daemon-reload >/dev/null || true -fi -# End automatically added section -# Automatically added by dh_installdebconf -if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then - . /usr/share/debconf/confmodule - db_purge -fi -# End automatically added section diff --git a/distros/ubuntu1504_cmake_split_packages/zoneminder-core.prerm.debhelper b/distros/ubuntu1504_cmake_split_packages/zoneminder-core.prerm.debhelper deleted file mode 100644 index 2d7592dc3..000000000 --- a/distros/ubuntu1504_cmake_split_packages/zoneminder-core.prerm.debhelper +++ /dev/null @@ -1,5 +0,0 @@ -# Automatically added by dh_installinit -if [ -x "/etc/init.d/zoneminder" ] || [ -e "/etc/init/zoneminder.conf" ]; then - invoke-rc.d zoneminder stop || exit $? -fi -# End automatically added section diff --git a/distros/ubuntu1504_cmake_split_packages/zoneminder-database.postrm.debhelper b/distros/ubuntu1504_cmake_split_packages/zoneminder-database.postrm.debhelper deleted file mode 100644 index bc035b98c..000000000 --- a/distros/ubuntu1504_cmake_split_packages/zoneminder-database.postrm.debhelper +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically added by dh_installdebconf -if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then - . /usr/share/debconf/confmodule - db_purge -fi -# End automatically added section diff --git a/distros/ubuntu1504_cmake_split_packages/zoneminder-ui-base.postrm.debhelper b/distros/ubuntu1504_cmake_split_packages/zoneminder-ui-base.postrm.debhelper deleted file mode 100644 index bc035b98c..000000000 --- a/distros/ubuntu1504_cmake_split_packages/zoneminder-ui-base.postrm.debhelper +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically added by dh_installdebconf -if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then - . /usr/share/debconf/confmodule - db_purge -fi -# End automatically added section diff --git a/scripts/ZoneMinder/lib/ZoneMinder/Control/SkyIPCam7xx.pm b/scripts/ZoneMinder/lib/ZoneMinder/Control/SkyIPCam7xx.pm index fd97c5a49..f3fc94754 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/Control/SkyIPCam7xx.pm +++ b/scripts/ZoneMinder/lib/ZoneMinder/Control/SkyIPCam7xx.pm @@ -107,7 +107,14 @@ sub sendCmd printMsg( $cmd, "Tx" ); - my $req = HTTP::Request->new( GET=>"http://".$self->{Monitor}->{ControlAddress}."$cmd" ); + my $url; + if ( $self->{Monitor}->{ControlAddress} =~ /^http/ ) { + $url = $self->{Monitor}->{ControlAddress}.$cmd; + } else { + $url = 'http://'.$self->{Monitor}->{ControlAddress}.$cmd; + } # en dif + my $req = HTTP::Request->new( GET=>$url ); + my $res = $self->{ua}->request($req); if ( $res->is_success ) diff --git a/scripts/ZoneMinder/lib/ZoneMinder/Trigger/Channel/Serial.pm b/scripts/ZoneMinder/lib/ZoneMinder/Trigger/Channel/Serial.pm index a3709b5bb..ddfc53436 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/Trigger/Channel/Serial.pm +++ b/scripts/ZoneMinder/lib/ZoneMinder/Trigger/Channel/Serial.pm @@ -58,6 +58,12 @@ sub open { my $self = shift; my $device = new Device::SerialPort( $self->{path} ); + if ( ! $device ) + { + Error( "Unable to open $$self{path}: $!" ); + $self->{state} = 'closed'; + return; + } $device->baudrate(9600); $device->databits(8); $device->parity('none'); diff --git a/scripts/zmcontrol.pl.in b/scripts/zmcontrol.pl.in index ee078f9a0..aba1d1c36 100644 --- a/scripts/zmcontrol.pl.in +++ b/scripts/zmcontrol.pl.in @@ -156,7 +156,7 @@ if ( !$server_up ) while (!connect( CLIENT, $saddr )) { $attempts++; - Fatal( "Can't connect: $!" ) if ($attempts > MAX_CONNECT_DELAY); + Fatal( "Can't connect: $! after $attempts attempts to $sock_file" ) if ($attempts > MAX_CONNECT_DELAY); sleep(1); } } diff --git a/scripts/zmdc.pl.in b/scripts/zmdc.pl.in index 3284674fe..5e2fb47c7 100644 --- a/scripts/zmdc.pl.in +++ b/scripts/zmdc.pl.in @@ -558,9 +558,9 @@ sub kill_until_dead { sub _stop { my ($final, $process ) = @_; - delete( $cmd_hash{$$process{command}} ); my $pid = send_stop( $final, $process ); return if ! $pid; + delete( $cmd_hash{$$process{command}} ); kill_until_dead( $process ); } diff --git a/scripts/zmtrigger.pl.in b/scripts/zmtrigger.pl.in index 0dc18562d..2dfbe3ed7 100644 --- a/scripts/zmtrigger.pl.in +++ b/scripts/zmtrigger.pl.in @@ -28,7 +28,82 @@ zmtrigger.pl - ZoneMinder External Trigger Script =head1 DESCRIPTION This script is used to trigger and cancel alarms from external connections -using an arbitrary text based format +using an arbitrary text based format. + +This script offers generic solution to external triggering of alarms. It +can handle external connections via either internet socket, unix socket or +file/device interfaces. You can either use it 'as is' if you can interface +with the existing format, or override connections and channels to customise +it to your needs. + +If enabled by the OPT_TRIGGERS option, Zoneminder service start +zmtrigger.pl which listens for control messages on TCP port 6802. + +=head1 TRIGGER MESSAGE FORMAT + +B|B|B|B|B|B + +=over 4 + +=item B + + is the id number or name of the ZM monitor. + +=item B + + Valid actions are 'on', 'off', 'cancel' or 'show' where + 'on' forces an alarm condition on; + 'off' forces an alarm condition off; + 'cancel' negates the previous 'on' or 'off'. + + The 'show' action merely updates some auxiliary text which can optionally + be displayed in the images captured by the monitor. Ordinarily you would + use 'on' and 'cancel', 'off' would tend to be used to suppress motion + based events. Additionally 'on' and 'off' can take an additional time + offset, e.g. on+20 which automatically 'cancel's the previous action + after that number of seconds. + +=item B + + is the score given to the alarm, usually to indicate it's + importance. For 'on' triggers it should be non-zero, otherwise it should + be zero. + +=item B + + is a 32 char max string indicating the reason for, or source of + the alarm e.g. 'Relay 1 open'. This is saved in the 'Cause' field of the + event. Ignored for 'off' or 'cancel' messages. + +=item B + + is a 256 char max additional info field, which is saved in the + 'Description' field of an event. Ignored for 'off' or 'cancel' messages. + +=item B + + is up to 32 characters of text that can be displayed in the + timestamp that is added to images. The 'show' action is designed to + update this text without affecting alarms but the text is updated, if + present, for any of the actions. This is designed to allow external input + to appear on the images captured, for instance temperature or personnel + identity etc. + +=back + +Note that multiple messages can be sent at once and should be LF or CRLF +delimited. This script is not necessarily intended to be a solution in +itself, but is intended to be used as 'glue' to help ZoneMinder interface +with other systems. It will almost certainly require some customisation +before you can make any use of it. If all you want to do is generate alarms +from external sources then using the ZoneMinder::SharedMem perl module is +likely to be easier. + +=head1 EXAMPLES + + 3|on+10|1|motion|text|showtext + +Triggers "alarm" on camera #3 for 10 seconds with score=1, cause="motion". =cut use strict; diff --git a/src/zm_image.cpp b/src/zm_image.cpp index 21e190ffb..8f91ab28b 100644 --- a/src/zm_image.cpp +++ b/src/zm_image.cpp @@ -2596,8 +2596,8 @@ void Image::Scale( unsigned int factor ) return; } - unsigned int new_width = (width*factor)/ZM_SCALE_BASE; - unsigned int new_height = (height*factor)/ZM_SCALE_BASE; + unsigned int new_width = (width*factor)/ZM_SCALE_BASE+1; + unsigned int new_height = (height*factor)/ZM_SCALE_BASE+1; size_t scale_buffer_size = new_width * new_height * colours; diff --git a/src/zmf.cpp b/src/zmf.cpp index c7544bcf1..07149c4cc 100644 --- a/src/zmf.cpp +++ b/src/zmf.cpp @@ -37,7 +37,7 @@ zmf - The ZoneMinder Frame daemon This is an optional daemon that can run in concert with the Analysis daemon and whose function it is to actually write captured frames to disk. This frees up the Analysis daemon to do more analysis (!) and so keep up with the Capture -daemon better. If it isn’t running or dies then the Analysis daemon just writes +daemon better. If it isn't running or dies then the Analysis daemon just writes them itself. =head1 OPTIONS diff --git a/src/zmu.cpp b/src/zmu.cpp index 1cecb6d22..a1e8887bd 100644 --- a/src/zmu.cpp +++ b/src/zmu.cpp @@ -33,7 +33,7 @@ zmc - The ZoneMinder Utility =head1 DESCRIPTION -This binary is a handy command line interface to several useful functions. It’s +This binary is a handy command line interface to several useful functions. It's not really meant to be used by anyone except the web page (there's only limited 'help' in it so far) but can be if necessary, especially for debugging video problems.