Merge branch 'master' into release-1.28
This commit is contained in:
commit
07cddf4164
|
@ -93,7 +93,7 @@ fi
|
|||
/usr/bin/gpasswd -a %{zmuid_final} dialout
|
||||
|
||||
# Display the README for post installation instructions
|
||||
/usr/bin/less %{_docdir}/%{name}-%{version}/README.Fedora
|
||||
/usr/bin/less %{_docdir}/%{name}/README.Fedora
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
|
|
|
@ -7,7 +7,7 @@ Standards-Version: 3.9.2
|
|||
|
||||
Package: zoneminder
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, apache2, libapache2-mod-php5 | libapache2-mod-fcgid, php5, php5-mysql|php5-mysqlnd, libphp-serialization-perl, libdate-manip-perl, libmime-lite-perl, libmime-tools-perl, mariadb-client|mysql-client, libwww-perl, libarchive-tar-perl, libarchive-zip-perl, libdevice-serialport-perl, libpcre3, ffmpeg | libav-tools, rsyslog | system-log-daemon, libmodule-load-perl, libsys-mmap-perl, libjson-any-perl, netpbm, libavdevice53, libjpeg8, zip, libnet-sftp-foreign-perl, libio-pty-perl, libexpect-perl, libvlccore5 | libvlccore7 | libvlccore8, libvlc5, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, libpolkit-gobject-1-0, liburi-encode-perl
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, apache2, libapache2-mod-php5 | libapache2-mod-fcgid, php5, php5-mysql|php5-mysqlnd, libphp-serialization-perl, libdate-manip-perl, libmime-lite-perl, libmime-tools-perl, mariadb-client|mysql-client, libwww-perl, libarchive-tar-perl, libarchive-zip-perl, libdevice-serialport-perl, libpcre3, ffmpeg | libav-tools, rsyslog | system-log-daemon, libmodule-load-perl, libsys-mmap-perl, libjson-any-perl, netpbm, libavdevice53, libjpeg8, zip, libnet-sftp-foreign-perl, libio-pty-perl, libexpect-perl, libvlccore5 | libvlccore7 | libvlccore8, libvlc5, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, libpolkit-gobject-1-0, liburi-escape-perl
|
||||
Recommends: mysql-server|mariadb-server
|
||||
Description: A video camera security and surveillance solution
|
||||
ZoneMinder is intended for use in single or multi-camera video security
|
||||
|
|
|
@ -38,8 +38,6 @@ require ZoneMinder::Control;
|
|||
|
||||
our @ISA = qw(ZoneMinder::Control);
|
||||
|
||||
our $VERSION = $ZoneMinder::Base::VERSION;
|
||||
|
||||
# ==========================================================================
|
||||
#
|
||||
# Axis V2 Control Protocol
|
||||
|
@ -50,10 +48,9 @@ use ZoneMinder::Logger qw(:all);
|
|||
use ZoneMinder::Config qw(:all);
|
||||
|
||||
use Time::HiRes qw( usleep );
|
||||
use URI::Encode qw();
|
||||
use URI::Escape qw(uri_escape);
|
||||
|
||||
sub new
|
||||
{
|
||||
sub new {
|
||||
my $class = shift;
|
||||
my $id = shift;
|
||||
my $self = ZoneMinder::Control->new( $id );
|
||||
|
@ -64,8 +61,7 @@ sub new
|
|||
|
||||
our $AUTOLOAD;
|
||||
|
||||
sub AUTOLOAD
|
||||
{
|
||||
sub AUTOLOAD {
|
||||
my $self = shift;
|
||||
my $class = ref($self) || croak( "$self not object" );
|
||||
my $name = $AUTOLOAD;
|
||||
|
@ -111,10 +107,15 @@ sub sendCmd {
|
|||
printMsg( $cmd, "Tx" );
|
||||
#print( "http://$address/$cmd\n" );
|
||||
#my $req = HTTP::Request->new( GET=>"http://".$self->{Monitor}->{ControlAddress}."/$cmd" );
|
||||
my $url = 'http://'.$self->{Monitor}->{ControlAddress}.'/cgi-bin/setGPIO.cgi?preventCache='.time;
|
||||
Debug("Url: $url $cmd");
|
||||
my $uri = URI::Encode->new( { encode_reserved => 0 } );
|
||||
my $encoded = $uri->encode( $cmd );
|
||||
|
||||
my $url;
|
||||
if ( $self->{Monitor}->{ControlAddress} =~ /^http/ ) {
|
||||
$url = $self->{Monitor}->{ControlAddress}.'/cgi-bin/setGPIO.cgi?preventCache='.time;
|
||||
} else {
|
||||
$url = 'http://'.$self->{Monitor}->{ControlAddress}.'/cgi-bin/setGPIO.cgi?preventCache='.time;
|
||||
} # en dif
|
||||
Error("Url: $url $cmd");
|
||||
my $encoded = uri_escape( $cmd );
|
||||
my $res = $self->{ua}->post( $url, Content=>"data=$encoded" );
|
||||
|
||||
if ( $res->is_success ) {
|
||||
|
|
|
@ -126,8 +126,19 @@ else
|
|||
ZoneMinder::Memory::Shared->import();
|
||||
}
|
||||
|
||||
# Detaint our environment
|
||||
$ENV{PATH} = '/bin:/usr/bin';
|
||||
$ENV{SHELL} = '/bin/sh' if exists $ENV{SHELL};
|
||||
delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};
|
||||
|
||||
# Native architecture
|
||||
our $arch = int(3.2*length(~0));
|
||||
|
||||
# The following returned the wrong result on some 32 bit distros running on 64 bit hardware
|
||||
#our $arch = int(3.2*length(~0));
|
||||
|
||||
# New method for determining the bitness
|
||||
our $arch = 32 + 32*( qx(uname -m) =~ /64/ );
|
||||
|
||||
our $native = $arch/8;
|
||||
our $mem_seq = 0;
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ use ZoneMinder;
|
|||
use Getopt::Long;
|
||||
use POSIX qw/strftime EPIPE/;
|
||||
use Socket;
|
||||
use Data::Dumper;
|
||||
#use Data::Dumper;
|
||||
use Module::Load;
|
||||
|
||||
use constant MAX_CONNECT_DELAY => 10;
|
||||
|
|
Loading…
Reference in New Issue