diff options
author | Max Kellermann <max@duempel.org> | 2008-09-07 13:53:55 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-07 13:53:55 +0200 |
commit | dc8b64fdef1f8bc4499eef3aca17ed336ea3569b (patch) | |
tree | ba98b059e544ddecd774bd4c97ce66898cba3be0 /src/directory.c | |
parent | 5609a1fcd09c498fdcdfe0f535052e8d8c3ef05c (diff) | |
download | mpd-dc8b64fdef1f8bc4499eef3aca17ed336ea3569b.tar.gz mpd-dc8b64fdef1f8bc4499eef3aca17ed336ea3569b.tar.xz mpd-dc8b64fdef1f8bc4499eef3aca17ed336ea3569b.zip |
pass "struct client" to dbUtils.c, song.c, tag_print.c
Don't pass the raw file descriptor around. This migration patch is
rather large, because all of the sources have inter dependencies - we
have to change all of them at the same time.
Diffstat (limited to 'src/directory.c')
-rw-r--r-- | src/directory.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/directory.c b/src/directory.c index 2e3e61f6f..5e1f7473d 100644 --- a/src/directory.c +++ b/src/directory.c @@ -29,7 +29,6 @@ #include "stats.h" #include "utils.h" #include "volume.h" -#include "myfprintf.h" #include "dbUtils.h" #include "song_print.h" #include "song_save.h" @@ -824,30 +823,30 @@ static Directory *getDirectory(const char *name) return getSubDirectory(mp3rootDirectory, name, &shortname); } -static int printDirectoryList(int fd, DirectoryList * directoryList) +static int printDirectoryList(struct client *client, DirectoryList * directoryList) { ListNode *node = directoryList->firstNode; Directory *directory; while (node != NULL) { directory = (Directory *) node->data; - fdprintf(fd, "%s%s\n", DIRECTORY_DIR, - getDirectoryPath(directory)); + client_printf(client, "%s%s\n", DIRECTORY_DIR, + getDirectoryPath(directory)); node = node->nextNode; } return 0; } -int printDirectoryInfo(int fd, const char *name) +int printDirectoryInfo(struct client *client, const char *name) { Directory *directory; if ((directory = getDirectory(name)) == NULL) return -1; - printDirectoryList(fd, directory->subDirectories); - printSongInfoFromList(fd, directory->songs); + printDirectoryList(client, directory->subDirectories); + printSongInfoFromList(client, directory->songs); return 0; } |