From da556d7ef067c58f895a0cbf5c729f306035a5c0 Mon Sep 17 00:00:00 2001 From: genius3000 Date: Thu, 10 Aug 2017 02:34:06 -0600 Subject: [PATCH] Properly store the value of `camera_dir` from the config Previously the directory was being used for the camera files but not being stored and therefore a Web Control config write would override the `camera_dir` line with the default value. Also changed the incorrect function name in the comment. --- conf.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/conf.c b/conf.c index 36b19743..4775891e 100644 --- a/conf.c +++ b/conf.c @@ -2405,13 +2405,13 @@ static const char *print_camera(struct context **cnt, char **str, } /** - * config_camera_dir + * read_camera_dir * Read the directory finding all *.conf files in the path * When found calls config_camera */ static struct context **read_camera_dir(struct context **cnt, const char *str, - int val ATTRIBUTE_UNUSED) + int val) { DIR *dp; struct dirent *ep; @@ -2448,6 +2448,9 @@ static struct context **read_camera_dir(struct context **cnt, const char *str, "%s not found", str); } + /* Store the given config value to allow writing it out */ + cnt = copy_string(cnt, str, val); + return cnt; }