mirror of
https://github.com/Motion-Project/motion.git
synced 2026-02-05 04:21:32 -05:00
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:
7
conf.c
7
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user