diff options
author | Max Kellermann <max@duempel.org> | 2008-09-07 13:57:58 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-07 13:57:58 +0200 |
commit | 4665f2bf32c59f263d22c2315d60509c9ae8854b (patch) | |
tree | 49d89bdd813e2a2a61ff210a2a720ff271cdcc2c | |
parent | 94293149b1375dad39745f2f8e5f1b8f0299cc61 (diff) | |
download | mpd-4665f2bf32c59f263d22c2315d60509c9ae8854b.tar.gz mpd-4665f2bf32c59f263d22c2315d60509c9ae8854b.tar.xz mpd-4665f2bf32c59f263d22c2315d60509c9ae8854b.zip |
tag: don't pass "fd" to printVisitedInTagTracker()
Pass the client struct instead of the raw file descriptor.
-rw-r--r-- | src/dbUtils.c | 2 | ||||
-rw-r--r-- | src/tagTracker.c | 11 | ||||
-rw-r--r-- | src/tagTracker.h | 4 |
3 files changed, 9 insertions, 8 deletions
diff --git a/src/dbUtils.c b/src/dbUtils.c index ba60dc485..9eb6aa46b 100644 --- a/src/dbUtils.c +++ b/src/dbUtils.c @@ -335,7 +335,7 @@ int listAllUniqueTags(struct client *client, int type, int numConditionals, &data); if (type >= 0 && type <= TAG_NUM_OF_ITEM_TYPES) { - printVisitedInTagTracker(client_get_fd(client), type); + printVisitedInTagTracker(client, type); } freeListCommandItem(item); diff --git a/src/tagTracker.c b/src/tagTracker.c index 13fba77c9..bc9a43bc7 100644 --- a/src/tagTracker.c +++ b/src/tagTracker.c @@ -20,7 +20,7 @@ #include "tag.h" #include "utils.h" -#include "myfprintf.h" +#include "client.h" #include "directory.h" struct visited { @@ -106,13 +106,12 @@ void visitInTagTracker(int type, const char *str) ++num_visited[type]; } -void printVisitedInTagTracker(int fd, int type) +void printVisitedInTagTracker(struct client *client, int type) { struct visited *v; for (v = visited_heads[type]; v != NULL; v = v->next) - fdprintf(fd, - "%s: %s\n", - mpdTagItemKeys[type], - v->value); + client_printf(client, "%s: %s\n", + mpdTagItemKeys[type], + v->value); } diff --git a/src/tagTracker.h b/src/tagTracker.h index 2edb5aad0..f3c778329 100644 --- a/src/tagTracker.h +++ b/src/tagTracker.h @@ -19,6 +19,8 @@ #ifndef TAG_TRACKER_H #define TAG_TRACKER_H +struct client; + int getNumberOfTagItems(int type); void printMemorySavedByTagTracker(void); @@ -27,6 +29,6 @@ void resetVisitedFlagsInTagTracker(int type); void visitInTagTracker(int type, const char *str); -void printVisitedInTagTracker(int fd, int type); +void printVisitedInTagTracker(struct client *client, int type); #endif |