summaryrefslogtreecommitdiff
path: root/src/mp3_vnops.c
diff options
context:
space:
mode:
authorUlf Lilleengen <lulf@carrot.studby.ntnu.no>2008-08-09 14:00:32 +0200
committerUlf Lilleengen <lulf@carrot.studby.ntnu.no>2008-08-09 14:00:32 +0200
commita0c3d4edb2ed876361b1eaaa383a12104e8b3aa1 (patch)
tree4727634f2ff233284f5645d469347d618b9aa9f9 /src/mp3_vnops.c
parent56e69975c0998e3d134865062f90d71fde8208d8 (diff)
- Split mp3_list into three functions performing initialization, adding data and
finishing (thus running the query).
Diffstat (limited to 'src/mp3_vnops.c')
-rwxr-xr-xsrc/mp3_vnops.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mp3_vnops.c b/src/mp3_vnops.c
index dec7ecb..8a620bf 100755
--- a/src/mp3_vnops.c
+++ b/src/mp3_vnops.c
@@ -60,6 +60,7 @@ static int mp3_readdir (const char *path, void *buf, fuse_fill_dir_t filler,
off_t offset, struct fuse_file_info *fi)
{
struct filler_data fd;
+ struct listhandle *lh;
filler (buf, ".", NULL, 0);
filler (buf, "..", NULL, 0);
@@ -85,7 +86,8 @@ static int mp3_readdir (const char *path, void *buf, fuse_fill_dir_t filler,
mp3_list_genre(path, &fd);
return (0);
} else if (strcmp(path, "/Tracks") == 0) {
- mp3_list(0, &fd, "SELECT title FROM song", "");
+ lh = mp3_list_start(0, &fd, "SELECT title FROM song");
+ mp3_list_finish(lh);
return (0);
}