summaryrefslogtreecommitdiffstats
path: root/mod_glusterfs
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@zresearch.com>2009-05-14 00:21:02 -0700
committerAnand V. Avati <avati@amp.gluster.com>2009-05-16 15:34:01 +0530
commitb4651c4b8c7ebbcee7bfc7ef50afebf7e25d5744 (patch)
treeb6641bcd50a136bc06badaf4bd86fc3f8923cff2 /mod_glusterfs
parent43a568d732962c8e095d3072f672451bcbe95f47 (diff)
apache/2.2/mod_glusterfs: port to use new glusterfs_readdir interface.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'mod_glusterfs')
-rw-r--r--mod_glusterfs/apache/2.2/src/mod_glusterfs.c10
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 a89e1c7b3ed..ee17ebb6510 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