Send Motion-user mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/motion-user
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Motion-user digest..."
Today's Topics:
1. Re: whitespace parsing error in src/conf.c ... (daniel jordan)
2. Re: whitespace parsing error in src/conf.c ... (daniel jordan)
----------------------------------------------------------------------
Message: 1
Date: Tue, 19 May 2020 22:42:07 -0700
From: daniel jordan <[email protected]>
To: Motion discussion list <[email protected]>
Subject: Re: [Motion-user] whitespace parsing error in src/conf.c ...
Message-ID:
<CAGkjMSNOrHTwP_S4hAd+wxKYRojzEZ=Fru=5wsveycnzv1o...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Actually, I apologize.
I had tested this in several other conf files ... honestly I Swear.
Anyway, now I can only repro it when I use a conf file in a conf.d
directory.
That is, if I put a space in motion.conf it doesn't have an error. In
motion.conf there need to have:
camera_dir /home/daniel/.motion/conf.d
and a camera1.conf in conf.d
I apologize for the curt initial response. I really thought I had tried in
different files.
-daniel
On Tue, May 19, 2020 at 10:27 PM tosiara <[email protected]> wrote:
> Do you have a sample config file that I could try to reproduce?
>
> On Wed, May 20, 2020, 02:29 daniel jordan <[email protected]> wrote:
>
>> hellos.
>>
>> I've created a patch file to fix a really small, yet rather annoying,
>> parsing error in src/conf.c.
>> Lines with all whitespace weren't handled correctly:
>> The terminator is correctly placed at line[1], however that means
>> strlen(line)
>> is 1,
>> not 0 as was being checked.
>>
>> patch is here:
>>
>> diff --git a/src/conf.c b/src/conf.c
>> index 49c0bbb..cef2404 100644
>> --- a/src/conf.c
>> +++ b/src/conf.c
>> @@ -2153,7 +2153,7 @@ static struct context **conf_process(struct context
>> **cnt, FILE *fp)
>> *(end+1) = '\0';
>>
>> /* If line is only whitespace we continue to the next line.
>> */
>> - if (strlen(line) == 0)
>> + if (strlen(line) <= 1)
>> continue;
>>
>> /* Trim leading whitespace from the line and find command. */
>>
>> -daniel
>>
>>
>> _______________________________________________
>> Motion-user mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/motion-user
>> https://motion-project.github.io/
>>
>> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
>
> _______________________________________________
> Motion-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/motion-user
> https://motion-project.github.io/
>
> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
-------------- next part --------------
An HTML attachment was scrubbed...
------------------------------
Message: 2
Date: Tue, 19 May 2020 22:44:18 -0700
From: daniel jordan <[email protected]>
To: Motion discussion list <[email protected]>
Subject: Re: [Motion-user] whitespace parsing error in src/conf.c ...
Message-ID:
<cagkjmspcm3hjd4h3ju9gtrhdg+z3jeh6hxofyoevrqxzvqf...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
The specific camera1.conf file contains is attached. The space was found
after the "framerate 2" line.
-daniel
# This config file was generated by motion 4.2.2
###########################################################
# Configuration options specific to camera 1
############################################################
# User defined name for the camera.
camera_name BlueHouse_IPC
target_dir /home/daniel/Collection/Camera2
# Create movies of motion events.
movie_output on
picture_output off
# picture_output_motion on
threshold 1500
locate_motion_mode on
locate_motion_style redbox
# Gap in seconds of no motion detected that triggers the end of an event.
event_gap 60
emulate_motion off
pre_capture 3
post_capture 0
# Maximum number of frames to be captured per second
framerate 2
# Numeric identifier for the camera.
camera_id 102
# The full URL of the network camera stream.
netcam_url rtsp://[email protected]:554
# Image width in pixels.
width 1280
# Image height in pixels.
height 960
# Text to be overlayed in the lower left corner of images
; text_left BlueHouseIPC
# File name(without extension) for movies relative to target directory
movie_filename BlueHouseIPC_%t-%v-%Y%m%d%H%M%S
On Tue, May 19, 2020 at 10:27 PM tosiara <[email protected]> wrote:
> Do you have a sample config file that I could try to reproduce?
>
> On Wed, May 20, 2020, 02:29 daniel jordan <[email protected]> wrote:
>
>> hellos.
>>
>> I've created a patch file to fix a really small, yet rather annoying,
>> parsing error in src/conf.c.
>> Lines with all whitespace weren't handled correctly:
>> The terminator is correctly placed at line[1], however that means
>> strlen(line)
>> is 1,
>> not 0 as was being checked.
>>
>> patch is here:
>>
>> diff --git a/src/conf.c b/src/conf.c
>> index 49c0bbb..cef2404 100644
>> --- a/src/conf.c
>> +++ b/src/conf.c
>> @@ -2153,7 +2153,7 @@ static struct context **conf_process(struct context
>> **cnt, FILE *fp)
>> *(end+1) = '\0';
>>
>> /* If line is only whitespace we continue to the next line.
>> */
>> - if (strlen(line) == 0)
>> + if (strlen(line) <= 1)
>> continue;
>>
>> /* Trim leading whitespace from the line and find command. */
>>
>> -daniel
>>
>>
>> _______________________________________________
>> Motion-user mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/motion-user
>> https://motion-project.github.io/
>>
>> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
>
> _______________________________________________
> Motion-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/motion-user
> https://motion-project.github.io/
>
> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
-------------- next part --------------
An HTML attachment was scrubbed...
------------------------------
------------------------------
Subject: Digest Footer
_______________________________________________
Motion-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/motion-user
------------------------------
End of Motion-user Digest, Vol 167, Issue 26
********************************************