[Gluster-devel] [PATCH 4/4] mod_glusterfs/apache/2.2: Applied changes of 7eb61fb44986fc834a19d9f38754f1be54d07e09.

Shehjar Tikoo shehjart at zresearch.com
Fri May 15 15:53:17 UTC 2009


matsuu at gmail.com wrote:
> From: MATSUU Takuto <matsuu at gentoo.org>

Thanks for taking the time out to do this.

One of our team has already fixed this particular issue.
That patch is just waiting to be pushed into the main repo.

Thanks
Shehjar


> 
> ---
>  mod_glusterfs/apache/2.2/src/mod_glusterfs.c |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/mod_glusterfs/apache/2.2/src/mod_glusterfs.c b/mod_glusterfs/apache/2.2/src/mod_glusterfs.c
> index a89e1c7..ee17ebb 100644
> --- a/mod_glusterfs/apache/2.2/src/mod_glusterfs.c
> +++ b/mod_glusterfs/apache/2.2/src/mod_glusterfs.c
> @@ -2785,7 +2785,7 @@ mod_glfs_index_directory (request_rec *r,
>          apr_size_t              dirpathlen;
>          glusterfs_dir_config_t *dir_config = NULL;
>          int                     ret = -1;
> -        struct dirent           entry = {0, };
> +        struct dirent          *entry = NULL;
>          struct stat             st = {0, };
>  
>          name = r->filename;
> @@ -2994,12 +2994,12 @@ mod_glfs_index_directory (request_rec *r,
>          memcpy(fullpath, name, dirpathlen);
>  
>          do {
> -                ret = glusterfs_readdir (fd, &entry, sizeof (entry));
> -                if (ret <= 0) {
> +                entry = glusterfs_readdir (fd);
> +                if (entry == NULL) {
>                          break;
>                  }
>  
> -                fname = apr_pstrcat (r->pool, path, entry.d_name, NULL);
> +                fname = apr_pstrcat (r->pool, path, entry->d_name, NULL);
>  
>                  ret = glusterfs_stat (fname, &st);
>                  if (ret != 0) {
> @@ -3007,7 +3007,7 @@ mod_glfs_index_directory (request_rec *r,
>                  }
>                  
>                  dirent.fname = fname;
> -                dirent.name = apr_pstrdup (r->pool, entry.d_name);
> +                dirent.name = apr_pstrdup (r->pool, entry->d_name);
>                  fill_out_finfo (&dirent, &st, 
>                                  APR_FINFO_MIN | APR_FINFO_IDENT
>                                  | APR_FINFO_NLINK | APR_FINFO_OWNER






More information about the Gluster-devel mailing list