From 35cd0b37acf289a8bedc033fbfc51cc6dd858aca Mon Sep 17 00:00:00 2001 From: Mr-DaveDev Date: Sun, 17 Dec 2017 11:21:24 -0700 Subject: [PATCH] Remove defaults for SQL parameters --- conf.c | 4 ++-- motion-dist.conf.in | 2 ++ motion.h | 4 ---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/conf.c b/conf.c index 2ed0fa8d..c432a40b 100644 --- a/conf.c +++ b/conf.c @@ -119,8 +119,8 @@ struct config conf_template = { .sql_log_snapshot = 1, .sql_log_movie = 0, .sql_log_timelapse = 0, - .sql_query_start = DEF_SQL_QUERY_START, - .sql_query = DEF_SQL_QUERY, + .sql_query_start = NULL, + .sql_query = NULL, .database_type = NULL, .database_dbname = NULL, .database_host = "localhost", diff --git a/motion-dist.conf.in b/motion-dist.conf.in index 9d3b79d9..45f3f2fc 100644 --- a/motion-dist.conf.in +++ b/motion-dist.conf.in @@ -667,6 +667,8 @@ quiet on # insert into security(camera, filename, frame, file_type, time_stamp, text_event) values('%t', '%f', '%q', '%n', '%Y-%m-%d %T', '%C') ; sql_query insert into security(camera, filename, frame, file_type, time_stamp, event_time_stamp) values('%t', '%f', '%q', '%n', '%Y-%m-%d %T', '%C') +# SQL query to execute at the start of an event to provide the dbeventid number +; sql_query_start ############################################################ # Database Options diff --git a/motion.h b/motion.h index 8fbef00f..40d77f15 100644 --- a/motion.h +++ b/motion.h @@ -182,10 +182,6 @@ struct image_data; #define DEF_TIMELAPSE_MODE "daily" -/* Do not break this line into two or more. Must be ONE line */ -#define DEF_SQL_QUERY_START "sql_query_start insert into security_events(camera, event_time_stamp) values('%t', '%Y-%m-%d %T')" -#define DEF_SQL_QUERY "sql_query insert into security_file(camera, filename, frame, file_type, time_stamp) values('%t', '%f', '%q', '%n', '%Y-%m-%d %T')" - /* OUTPUT Image types */ #define IMAGE_TYPE_JPEG 0 #define IMAGE_TYPE_PPM 1