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

matsuu at gmail.com matsuu at gmail.com
Fri May 15 14:54:20 UTC 2009


From: MATSUU Takuto <matsuu at gentoo.org>

---
 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
-- 
1.6.3






More information about the Gluster-devel mailing list