Bug 88830

Summary: Add object name parsing to pa_config_parser
Product: PulseAudio Reporter: Tanu Kaskinen <tanuk>
Component: coreAssignee: pulseaudio-bugs
Status: RESOLVED MOVED QA Contact: pulseaudio-bugs
Severity: normal    
Priority: medium CC: lennart
Version: unspecifiedKeywords: love
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Tanu Kaskinen 2015-01-27 17:42:42 UTC
Some configuration files support the following pattern:

    [SomeObjectType foo]
    somekey = somevalue

    [SomeObjectType bar]
    somekey = someothervalue

In the above example, "SomeObjectType" identifies a type for an object, and "foo" and "bar" identify the object. Currently pa_config_parser doesn't understand anything about this, however; it just sees that there are two section with names "SomeObjectType foo" and "SomeObjectType bar". This means that parsing the object names is pushed to the code that is using pa_config_parser. The object names are parsed every time a config value assignment is done, which is redundant work, and makes the parsing more complicated, and it also prevents us from printing the line number of the section header when a missing or invalid object name is encountered.

So, pa_config_parser should be extended so that it natively understands the concept of object names in section headers, so that the users of pa_config_parser can easily fetch the object name without having to parse it themselves.
Comment 1 GitLab Migration User 2018-07-30 09:34:28 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/23.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.