aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-07 14:02:52 +0200
committerMax Kellermann <max@duempel.org>2008-09-07 14:02:52 +0200
commit93e6d4c3adff4cfd06af77082793a0ba0fcf5fa5 (patch)
treed85131c327969b910006c326ebb5cbb232e2c0ac /src/playlist.c
parent709ec6fa39e031953f64bab6c3e84d7688e04632 (diff)
downloadmpd-93e6d4c3adff4cfd06af77082793a0ba0fcf5fa5.tar.gz
mpd-93e6d4c3adff4cfd06af77082793a0ba0fcf5fa5.tar.xz
mpd-93e6d4c3adff4cfd06af77082793a0ba0fcf5fa5.zip
playlist: don't pass "fd" to showPlaylist(), playlistChangesPosId()
Pass the client struct instead of the raw file descriptor.
Diffstat (limited to '')
-rw-r--r--src/playlist.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/playlist.c b/src/playlist.c
index a0b1be3e9..50ba0e8b0 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -31,7 +31,6 @@
#include "state_file.h"
#include "storedPlaylist.h"
#include "ack.h"
-#include "myfprintf.h"
#include "os_compat.h"
#define PLAYLIST_STATE_STOP 0
@@ -218,14 +217,14 @@ int clearStoredPlaylist(const char *utf8file)
return removeAllFromStoredPlaylistByPath(utf8file);
}
-void showPlaylist(int fd)
+void showPlaylist(struct client *client)
{
int i;
char path_max_tmp[MPD_PATH_MAX];
for (i = 0; i < playlist.length; i++) {
- fdprintf(fd, "%i:%s\n", i,
- get_song_url(path_max_tmp, playlist.songs[i]));
+ client_printf(client, "%i:%s\n", i,
+ get_song_url(path_max_tmp, playlist.songs[i]));
}
}
@@ -400,7 +399,7 @@ int playlistChanges(struct client *client, mpd_uint32 version)
return 0;
}
-int playlistChangesPosId(int fd, mpd_uint32 version)
+int playlistChangesPosId(struct client *client, mpd_uint32 version)
{
int i;
@@ -408,8 +407,8 @@ int playlistChangesPosId(int fd, mpd_uint32 version)
if (version > playlist.version ||
playlist.songMod[i] >= version ||
playlist.songMod[i] == 0) {
- fdprintf(fd, "cpos: %i\nId: %i\n",
- i, playlist.positionToId[i]);
+ client_printf(client, "cpos: %i\nId: %i\n",
+ i, playlist.positionToId[i]);
}
}