[vlc-devel] [PATCH 08/10] Removes xspf generation in access/directory.c in favor of new pf_readdir callback
Rémi Denis-Courmont
remi at remlab.net
Mon Jun 16 16:41:32 CEST 2014
Le 2014-06-16 20:41, Julien 'Lta' BALLET a écrit :
> From: Julien 'Lta' BALLET <contact at lta.io>
>
> ---
> modules/access/directory.c | 329
> ++++++++++-----------------------------------
> 1 file changed, 72 insertions(+), 257 deletions(-)
>
> diff --git a/modules/access/directory.c b/modules/access/directory.c
> index 3d72dc0..2d08178 100644
> --- a/modules/access/directory.c
> +++ b/modules/access/directory.c
> @@ -44,18 +44,20 @@
> #include <vlc_url.h>
> #include <vlc_strings.h>
> #include <vlc_charset.h>
> +#include <vlc_input_item.h>
>
> -enum
> -{
> - MODE_NONE,
> - MODE_COLLAPSE,
> - MODE_EXPAND,
> -};
>
> +/*****************************************************************************
> + * Local prototypes
> +
>
> *****************************************************************************/
> +static input_item_t *DirRead(access_t *);
>
> -typedef struct directory_t directory_t;
> -struct directory_t
> +
>
> +/*****************************************************************************
> + * Local data structures
> +
>
> *****************************************************************************/
> +typedef struct directory directory;
> +struct directory
> {
> - directory_t *parent;
> DIR *handle;
> char *uri;
> char **filev;
That structure only exists because of recursion. If you remove
recursion, you should remove this structure as well.
> -#ifdef HAVE_OPENAT
> -/* Detect directories that recurse into themselves. */
> -static bool has_inode_loop (const directory_t *dir, dev_t dev, ino_t
> inode)
> -{
> - while (dir != NULL)
> - {
> - if ((dir->device == dev) && (dir->inode == inode))
> - return true;
> - dir = dir->parent;
> - }
> - return false;
> -}
> -#endif
What will prevent infinite recursion in the playlist after this gets
removed?
--
Rémi Denis-Courmont
More information about the vlc-devel
mailing list