Merge branch 'master' of https://github.com/manupap1/ZoneMinder into plugin_support

Conflicts:
	distros/debian8/patches/01_vendor-perl.diff
	distros/debian8/patches/series
This commit is contained in:
Emmanuel Papin 2015-01-04 12:23:29 +01:00
commit f551b50ec0
9 changed files with 17 additions and 48 deletions

View File

@ -1,17 +0,0 @@
Index: ZoneMinder/configure.ac
===================================================================
--- ZoneMinder.orig/configure.ac 2014-12-13 15:10:27.705191682 +0100
+++ ZoneMinder/configure.ac 2014-12-13 16:50:07.101049743 +0100
@@ -443,10 +443,10 @@
PERL_SITE_LIB=`perl -V:installsitelib | sed -e "s/.*='\(.*\)';/\1/"`
PERL_LIB_PATH=`echo $PERL_SITE_LIB | sed -e "s|^$PERL_SITE_PREFIX||"`
EXTRA_PERL_LIB="use lib '$prefix$PERL_LIB_PATH'; # Include custom perl install path"
- PERL_MM_PARMS="PREFIX=$prefix"
+ PERL_MM_PARMS="\"PREFIX=$prefix INSTALLDIRS=vendor\""
else
EXTRA_PERL_LIB="# Include from system perl paths only"
- PERL_MM_PARMS=
+ PERL_MM_PARMS="\"INSTALLDIRS=vendor\""
fi
AC_SUBST(PERL_MM_PARMS)
AC_SUBST(EXTRA_PERL_LIB)

View File

@ -1 +0,0 @@
01_vendor-perl.diff

View File

@ -1,15 +0,0 @@
--- a/configure.ac
+++ b/configure.ac
@@ -550,10 +550,10 @@
PERL_SITE_LIB=`perl -V:installsitelib | sed -e "s/.*='\(.*\)';/\1/"`
PERL_LIB_PATH=`echo $PERL_SITE_LIB | sed -e "s|^$PERL_SITE_PREFIX||"`
EXTRA_PERL_LIB="use lib '$prefix$PERL_LIB_PATH'; # Include custom perl install path"
- PERL_MM_PARMS="PREFIX=$prefix"
+ PERL_MM_PARMS="\"PREFIX=$prefix INSTALLDIRS=vendor\""
else
EXTRA_PERL_LIB="# Include from system perl paths only"
- PERL_MM_PARMS=
+ PERL_MM_PARMS="\"INSTALLDIRS=vendor\""
fi
AC_SUBST(PERL_MM_PARMS)
AC_SUBST(EXTRA_PERL_LIB)

View File

@ -1,2 +1,5 @@
<<<<<<< HEAD
01_vendor-perl.diff
02_service-file-name.diff
=======
>>>>>>> ac80649e26d0197bf15dc06e505ecc86bd0aae68

View File

@ -278,7 +278,7 @@ sub getFilters
my $sql = "select E.Id,E.MonitorId,M.Name as MonitorName,M.DefaultRate,M.DefaultScale,E.Name,E.Cause,E.Notes,E.StartTime,unix_timestamp(E.StartTime) as Time,E.Length,E.Frames,E.AlarmFrames,E.TotScore,E.AvgScore,E.MaxScore,E.Archived,E.Videoed,E.Uploaded,E.Emailed,E.Messaged,E.Executed from Events as E inner join Monitors as M on M.Id = E.MonitorId";
$db_filter->{Sql} = '';
if ( @{$filter_expr->{terms}} )
if ( $filter_expr->{terms} )
{
for ( my $i = 0; $i < @{$filter_expr->{terms}}; $i++ )
{

View File

@ -31,12 +31,9 @@
#include <alloca.h>
#endif
#include <string.h>
//#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/param.h>
//#include <sys/socket.h>
//#include <netinet/in.h>
#include <netinet/tcp.h>
int CommsBase::readV( int iovcnt, /* const void *, int, */ ... )

View File

@ -22,6 +22,7 @@
#include "zm_exception.h"
#include <string.h>
#include <unistd.h>
#include <netdb.h>
#include <errno.h>
@ -30,6 +31,12 @@
#include <set>
#include <vector>
#if defined(BSD)
#include <sys/uio.h>
#include <sys/socket.h>
#include <netinet/in.h>
#endif
class CommsException : public Exception
{
public:

View File

@ -188,9 +188,9 @@ switch ( $_REQUEST['task'] )
}
$exportKey = substr(md5(rand()),0,8);
$exportFile = "zm-log.$exportExt";
$exportPath = "temp/zm-log-$exportKey.$exportExt";
$exportPath = ZM_PATH_SWAP."/zm-log-$exportKey.$exportExt";
if ( !($exportFP = fopen( $exportPath, "w" )) )
Fatal( "Unable to open log export file $exportFile" );
Fatal( "Unable to open log export file $exportPath" );
$logs = array();
foreach ( dbFetchAll( $sql, NULL, $values ) as $log )
{

View File

@ -1611,19 +1611,14 @@ function sortTag( $field )
function getLoad()
{
$uptime = shell_exec( 'uptime' );
$load = '';
if ( preg_match( '/load average: ([\d.]+)/', $uptime, $matches ) )
$load = $matches[1];
return( $load );
$load = sys_getloadavg();
return( $load[0] );
}
function getDiskPercent()
{
$df = shell_exec( 'df '.ZM_DIR_EVENTS );
$space = -1;
if ( preg_match( '/\s(\d+)%/ms', $df, $matches ) )
$space = $matches[1];
$total = disk_total_space(ZM_DIR_EVENTS);
$space = round(($total - disk_free_space(ZM_DIR_EVENTS)) / $total * 100);
return( $space );
}