[vlc-devel] [PATCH 4/5] keystore: fail if keystore memory has option

Alexandre Janniaux ajanni at videolabs.io
Tue Jul 30 17:17:09 CEST 2019


Hi,

Remi is right, but it doesn't look supported by the config_ChainParse
function. Would it need additional code to split on commas and taking
into account the braces ?

I had a quick look and didn't found anything relevant, as the previous
behaviour (from module_need) was based on strcspn(psz, ",").

It might be possible to refactor the config_ChainParse to select a
delimiter, so as to fix the syntax.

Regards,
--
Alexandre Janniaux
VideoLabs


On Tue, Jul 30, 2019 at 05:35:37PM +0300, Rémi Denis-Courmont wrote:
> Hi,
>
> You can already fallback the usual way with a comma. Please don't overload and duplicate the syntax.
>
> Le 30 juillet 2019 14:01:39 GMT+03:00, "Maxime ..." <mmeisson at outlook.fr> a écrit :
> >---
> > modules/keystore/memory.c | 8 ++++++--
> > 1 file changed, 6 insertions(+), 2 deletions(-)
> >
> >diff --git a/modules/keystore/memory.c b/modules/keystore/memory.c
> >index 4ad1208262..4ad6b9ad3e 100644
> >--- a/modules/keystore/memory.c
> >+++ b/modules/keystore/memory.c
> >@@ -154,13 +154,17 @@ Close(vlc_object_t *p_this)
> > static int
> > Open(vlc_keystore *p_keystore, const config_chain_t *config)
> > {
> >+    if ( config != NULL )
> >+    {
> >+        msg_Err(p_keystore, "unknow option(s) given to keystore
> >module");
> >+        return VLC_EGENERIC;
> >+    }
> >     vlc_keystore_sys *p_sys = calloc(1, sizeof(vlc_keystore_sys));
> >+
> >     if (!p_sys)
> >         return VLC_EGENERIC;
> >     p_keystore->p_sys = p_sys;
> >
> >-    VLC_UNUSED(config); // No option to parse atm
> >-
> >     vlc_mutex_init(&p_keystore->p_sys->lock);
> >     p_keystore->pf_store = Store;
> >     p_keystore->pf_find = Find;
> >--
> >2.17.1
> >
> >_______________________________________________
> >vlc-devel mailing list
> >To unsubscribe or modify your subscription options:
> >https://mailman.videolan.org/listinfo/vlc-devel
>
> --
> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.

> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list