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 ... (Mike Wilson)
----------------------------------------------------------------------
Message: 1
Date: Wed, 20 May 2020 12:48:19 -0400
From: Mike Wilson <[email protected]>
To: Motion discussion list <[email protected]>
Subject: Re: [Motion-user] whitespace parsing error in src/conf.c ...
Message-ID:
<caaveucr9ccwvd-pa8fo_bd7qncr0fzobqj5f83kahaxjszu...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
I would think the best fix here is to trim the whitespace more than skip
any single character.
On Wed, May 20, 2020 at 1:46 AM daniel jordan <[email protected]>
wrote:
>
> 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
>
> _______________________________________________
> 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 27
********************************************