|
@@ -48,7 +48,7 @@ int main(int argc, const char * argv[])
|
|
|
for (i = 0; i < NUM_DEVICES; i++) {
|
|
for (i = 0; i < NUM_DEVICES; i++) {
|
|
|
if (readDev(device[i])) {
|
|
if (readDev(device[i])) {
|
|
|
motion = 1;
|
|
motion = 1;
|
|
|
- i = NUM_DEVICES;
|
|
|
|
|
|
|
+ break;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -58,10 +58,8 @@ int main(int argc, const char * argv[])
|
|
|
printf("Motion detected\n");
|
|
printf("Motion detected\n");
|
|
|
#endif
|
|
#endif
|
|
|
if (utimes(outfile, NULL) != 0) {
|
|
if (utimes(outfile, NULL) != 0) {
|
|
|
- if (errno == ENOENT) {
|
|
|
|
|
- } else {
|
|
|
|
|
- fprintf(stderr, "Error touching output file (%s): %s\n", strerror(errno), outfile);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ fprintf(stderr, "Error touching output file (%s): %s\n", strerror(errno), outfile);
|
|
|
|
|
+ exit(2);
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
#ifdef DEBUG
|
|
#ifdef DEBUG
|