Merge branch 'storageareas' of github.com:ZoneMinder/ZoneMinder into storageareas
This commit is contained in:
commit
a141064aad
|
@ -840,7 +840,7 @@ bool EventStream::loadInitialEventData( int monitor_id, time_t event_time )
|
|||
return( true );
|
||||
}
|
||||
|
||||
bool EventStream::loadInitialEventData( int init_event_id, int init_frame_id )
|
||||
bool EventStream::loadInitialEventData( int init_event_id, unsigned int init_frame_id )
|
||||
{
|
||||
loadEventData( init_event_id );
|
||||
|
||||
|
|
|
@ -247,7 +247,7 @@ protected:
|
|||
|
||||
protected:
|
||||
bool loadEventData( int event_id );
|
||||
bool loadInitialEventData( int init_event_id, int init_frame_id );
|
||||
bool loadInitialEventData( int init_event_id, unsigned int init_frame_id );
|
||||
bool loadInitialEventData( int monitor_id, time_t event_time );
|
||||
|
||||
void checkEventLoaded();
|
||||
|
@ -266,7 +266,7 @@ public:
|
|||
|
||||
event_data = 0;
|
||||
}
|
||||
void setStreamStart( int init_event_id, int init_frame_id=0 )
|
||||
void setStreamStart( int init_event_id, unsigned int init_frame_id=0 )
|
||||
{
|
||||
loadInitialEventData( init_event_id, init_frame_id );
|
||||
loadMonitor( event_data->monitor_id );
|
||||
|
|
|
@ -47,15 +47,12 @@ RETSIGTYPE zm_die_handler(int signal, siginfo_t * info, void *context)
|
|||
RETSIGTYPE zm_die_handler(int signal)
|
||||
#endif
|
||||
{
|
||||
#if (defined(__i386__) || defined(__x86_64__))
|
||||
void *cr2 = 0;
|
||||
void *ip = 0;
|
||||
#endif
|
||||
Error("Got signal %d (%s), crashing", signal, strsignal(signal));
|
||||
|
||||
#if (defined(__i386__) || defined(__x86_64__))
|
||||
// Get more information if available
|
||||
#if ( HAVE_SIGINFO_T && HAVE_UCONTEXT_T )
|
||||
void *ip = 0;
|
||||
void *cr2 = 0;
|
||||
if (info && context) {
|
||||
|
||||
Debug(1,
|
||||
|
|
|
@ -62,7 +62,7 @@ int main( int argc, const char *argv[] )
|
|||
int monitor_id = 0;
|
||||
time_t event_time = 0;
|
||||
int event_id = 0;
|
||||
int frame_id = 1;
|
||||
unsigned int frame_id = 1;
|
||||
unsigned int scale = 100;
|
||||
unsigned int rate = 100;
|
||||
double maxfps = 10.0;
|
||||
|
|
|
@ -756,15 +756,14 @@ int main( int argc, char *argv[] )
|
|||
|
||||
if ( function & ZMU_LIST )
|
||||
{
|
||||
char sql[ZM_SQL_SML_BUFSIZ];
|
||||
strncpy( sql, "select Id, Function+0 from Monitors", sizeof(sql) );
|
||||
std::string sql = "select Id, Function+0 from Monitors";
|
||||
if ( !verbose )
|
||||
{
|
||||
strncat( sql, " where Function != 'None'", sizeof(sql)-strlen(sql) );
|
||||
sql += "where Function != 'None'";
|
||||
}
|
||||
strncat( sql, " order by Id asc", sizeof(sql)-strlen(sql) );
|
||||
sql += " order by Id asc";
|
||||
|
||||
if ( mysql_query( &dbconn, sql ) )
|
||||
if ( mysql_query( &dbconn, sql.c_str() ) )
|
||||
{
|
||||
Error( "Can't run query: %s", mysql_error( &dbconn ) );
|
||||
exit( mysql_errno( &dbconn ) );
|
||||
|
|
|
@ -66,14 +66,12 @@ if ( !empty($limit) && $nEvents > $limit )
|
|||
$nEvents = $limit;
|
||||
}
|
||||
$pages = (int)ceil($nEvents/ZM_WEB_EVENTS_PER_PAGE);
|
||||
if ( $pages > 1 ) {
|
||||
if ( !empty($page) ) {
|
||||
if ( $page < 0 )
|
||||
$page = 1;
|
||||
if ( $page > $pages )
|
||||
$page = $pages;
|
||||
}
|
||||
}
|
||||
if ( !empty($page) ) {
|
||||
$limitStart = (($page-1)*ZM_WEB_EVENTS_PER_PAGE);
|
||||
if ( empty( $limit ) )
|
||||
|
|
Loading…
Reference in New Issue