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.
This commit is contained in:
genius3000
2017-08-10 02:34:06 -06:00
parent 3af03ad642
commit da556d7ef0

7
conf.c
View File

@@ -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 * Read the directory finding all *.conf files in the path
* When found calls config_camera * When found calls config_camera
*/ */
static struct context **read_camera_dir(struct context **cnt, const char *str, static struct context **read_camera_dir(struct context **cnt, const char *str,
int val ATTRIBUTE_UNUSED) int val)
{ {
DIR *dp; DIR *dp;
struct dirent *ep; struct dirent *ep;
@@ -2448,6 +2448,9 @@ static struct context **read_camera_dir(struct context **cnt, const char *str,
"%s not found", str); "%s not found", str);
} }
/* Store the given config value to allow writing it out */
cnt = copy_string(cnt, str, val);
return cnt; return cnt;
} }