Skip to content

Commit 47b1a37

Browse files
committed
Create a camera file if nothing is specified
1 parent 1ceaccb commit 47b1a37

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/conf.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4457,6 +4457,14 @@ void cls_config::init()
44574457

44584458
app->conf_src->process();
44594459

4460+
if ((app->cam_cnt == 0) && (app->snd_cnt == 0)) {
4461+
MOTION_LOG(NTC, TYPE_ALL, NO_ERRNO
4462+
, _("No camera or sound configuration files specified."));
4463+
MOTION_LOG(NTC, TYPE_ALL, NO_ERRNO
4464+
, _("Adding a camera configuration file."));
4465+
app->conf_src->camera_add("", false);
4466+
}
4467+
44604468
cmdline();
44614469

44624470
for (indx=0; indx<app->cam_cnt; indx++) {

0 commit comments

Comments
 (0)