From 298d82e0907fa36b9ce06cdc56fe9b60ea3058e6 Mon Sep 17 00:00:00 2001 From: stan Date: Tue, 24 Dec 2002 11:58:52 +0000 Subject: [PATCH] Removed CheckFunction function. git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@214 e3e1d417-86f3-4887-817a-d78f3d33393f --- src/zm.cpp | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/src/zm.cpp b/src/zm.cpp index 30bea140a..33cc4c5ac 100644 --- a/src/zm.cpp +++ b/src/zm.cpp @@ -1626,40 +1626,6 @@ void Monitor::CancelAlarm() shared_images->forced_alarm = false; } -void Monitor::CheckFunction() -{ - static char sql[256]; - sprintf( sql, "select Function+0 from Monitors where Id = %d", id ); - if ( mysql_query( &dbconn, sql ) ) - { - Error(( "Can't run query: %s\n", mysql_error( &dbconn ) )); - exit( mysql_errno( &dbconn ) ); - } - - MYSQL_RES *result = mysql_store_result( &dbconn ); - if ( !result ) - { - Error(( "Can't use query result: %s\n", mysql_error( &dbconn ) )); - exit( mysql_errno( &dbconn ) ); - } - for( int i = 0; MYSQL_ROW dbrow = mysql_fetch_row( result ); i++ ) - { - function = (Function)atoi(dbrow[0]); - } - if ( mysql_errno( &dbconn ) ) - { - Error(( "Can't fetch row: %s\n", mysql_error( &dbconn ) )); - exit( mysql_errno( &dbconn ) ); - } - // Yadda yadda - mysql_free_result( result ); - - if ( function != ACTIVE ) - { - shared_images->state = state = IDLE; - } -} - void Monitor::DumpZoneImage() { int index = shared_images->last_write_index;