diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-10-02 03:24:21 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-10-02 03:24:21 -0700 |
commit | bf402578ab5bd9bc35bb5539d381d5612d19d40b (patch) | |
tree | 9dfa45ebb1cea9e96b9b598bb5e89eeaa24a0ae0 /src/playlist.c | |
parent | fcbcdd9869e3147fe4a30ba808af294f680c9373 (diff) | |
download | mpd-bf402578ab5bd9bc35bb5539d381d5612d19d40b.tar.gz mpd-bf402578ab5bd9bc35bb5539d381d5612d19d40b.tar.xz mpd-bf402578ab5bd9bc35bb5539d381d5612d19d40b.zip |
Revert "Start using song pointers in core data structures"
This actually opened us up to making lock dependencies more
difficult than they needed to be now that we have threaded
updates. We would always use the memory anyways, just in
the stack instead of bss.
Diffstat (limited to 'src/playlist.c')
-rw-r--r-- | src/playlist.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/playlist.c b/src/playlist.c index ca903036d..2ab09ebff 100644 --- a/src/playlist.c +++ b/src/playlist.c @@ -554,11 +554,15 @@ void playlist_queue_next(void) wakeup_main_task(); } -Song *playlist_queued_song(void) +char *playlist_queued_url(char utf8url[MPD_PATH_MAX]) { + Song *song; + assert(pthread_equal(pthread_self(), dc.thread)); pthread_mutex_lock(&queue_lock); - return song_at(playlist.queued); + song = song_at(playlist.queued); + + return song ? get_song_url(utf8url, song) : NULL; } static void queue_song_locked(int order_num) |