From b4651c4b8c7ebbcee7bfc7ef50afebf7e25d5744 Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Thu, 14 May 2009 00:21:02 -0700 Subject: apache/2.2/mod_glusterfs: port to use new glusterfs_readdir interface. Signed-off-by: Anand V. Avati --- mod_glusterfs/apache/2.2/src/mod_glusterfs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'mod_glusterfs') diff --git a/mod_glusterfs/apache/2.2/src/mod_glusterfs.c b/mod_glusterfs/apache/2.2/src/mod_glusterfs.c index a89e1c7b3..ee17ebb65 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 -- cgit