1. 08 Oct, 2008 1 commit
  2. 07 Sep, 2008 1 commit
    • Max Kellermann's avatar
      fix -Wcast-qual -Wwrite-strings warnings · 4dd9d4b2
      Max Kellermann authored
      The previous patch enabled these warnings.  In Eric's branch, they
      were worked around with a generic deconst_ptr() function.  There are
      several places where we can add "const" to pointers, and in others,
      libraries want non-const strings.  In the latter, convert string
      literals to "static char[]" variables - this takes the same space, and
      seems safer than deconsting a string literal.
      4dd9d4b2
  3. 12 Apr, 2008 1 commit
    • Max Kellermann's avatar
      clean up CPP includes · c89b358c
      Max Kellermann authored
      Try to only include headers which are really needed.  We should
      particularly check all "headers including other headers".  The
      long-term goal is to have a manageable, small API for plugins
      (decoders, output) without so many mpd internals cluttering the
      namespace.
      
      git-svn-id: https://svn.musicpd.org/mpd/trunk@7319 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      c89b358c
  4. 05 Feb, 2008 1 commit
  5. 26 Jan, 2008 1 commit
    • Eric Wong's avatar
      Revert the queue implementation and commands · 688289b2
      Eric Wong authored
      It's too ugly and broken (both technically and usability-wise)
      to be worth supporting in any stable release.
      
      In one sentence: The queue is a very crippled version of the
      playlist that takes precedence over the normal playlist.
      
      How is it crippled?
      
      * The "queueid" command only allows the queuing of songs
      ALREADY IN THE PLAYLIST!  This promotes having the entire mpd
      database of songs in the playlist, which is a stupid practice
      to begin with.
      
      * It doesn't allow for meaningful rearranging and movement
      of songs within the queue.  To move a song, you'd need to
      dequeue and requeue it (and other songs on the list).
      Why?  The playlist already allows _all_ these features
      and shows everything a client needs to know about the ordering
      of songs in a _single_ command!
      
      * Random was a stupid idea to begin with and unfortunately
      we're stuck supporting it since we've always had it.  Users
      should learn to use "shuffle" instead and not look at their
      playlists.  Implementing queue because we have the problem of
      random is just a bandage fix and digging ourselves a new hole.
      
      This protocol addition was never in a stable release of mpd, so
      reverting it will only break things for people following trunk;
      which I'm not too worried about.  I am however worried about
      long-term support of this misfeature, so I'm removing it.
      
      Additionally, there are other points:
      
      * It's trivially DoS-able:
      
      (while true; do echo queueid $song_id; done) | nc $MPD_HOST $MPD_PORT
      
      The above commands would cause the queue to become infinitely
      expanding, taking up all available memory in the system.  The
      mpd playlist was implemented as an array with a fixed (but
      configurable) size limit for this reason.
      
      * It's not backwards-compatible.  All clients would require
      upgrades (and additional complexity) to even know what the
      next song in the playlist is.  mpd is a shared architecture,
      and we should not violate the principle of least astonishment
      here.
      
      This removes the following commands:
      queueid, dequeue, queueinfo
      
      Additionally, the status field of "playlistqueue: " is removed
      from the status command.
      
      While this DoS is trivial to fix, the design is simply too
      broken to ever support in a real release.
      
      The overloading of the "addid" command and the allowing of
      negative numbers to be used as offsets is far more flexible.
      
      This improved "addid" is completely backwards-compatible with
      all clients, and does not require clients to have UI changes or
      run additional commands to display the queue.
      
      git-svn-id: https://svn.musicpd.org/mpd/trunk@7155 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      688289b2
  6. 03 Jan, 2008 1 commit
    • Eric Wong's avatar
      Cleanup #includes of standard system headers and put them in one place · cb8f1af3
      Eric Wong authored
      This will make refactoring features easier, especially now that
      pthreads support and larger refactorings are on the horizon.
      
      Hopefully, this will make porting to other platforms (even
      non-UNIX-like ones for masochists) easier, too.
      
      os_compat.h will house all the #includes for system headers
      considered to be the "core" of MPD.  Headers for optional
      features will be left to individual source files.
      
      git-svn-id: https://svn.musicpd.org/mpd/trunk@7130 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      cb8f1af3
  7. 26 Sep, 2007 1 commit
  8. 05 Apr, 2007 1 commit
  9. 26 Aug, 2006 1 commit
    • Eric Wong's avatar
      Replace strdup and {c,re,m}alloc with x* variants to check for OOM errors · 90847fc8
      Eric Wong authored
      I'm checking for zero-size allocations and assert()-ing them,
      so we can more easily get backtraces and debug problems, but we'll
      also allow -DNDEBUG people to live on the edge if they wish.
      
      We do not rely on errno when checking for OOM errors because
      some implementations of malloc do not set it, and malloc
      is commonly overridden by userspace wrappers.
      
      I've spent some time looking through the source and didn't find any
      obvious places where we would explicitly allocate 0 bytes, so we
      shouldn't trip any of those assertions.
      
      We also avoid allocating zero bytes because C libraries don't
      handle this consistently (some return NULL, some not); and it's
      dangerous either way.
      
      git-svn-id: https://svn.musicpd.org/mpd/trunk@4690 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      90847fc8
  10. 20 Jul, 2006 1 commit
  11. 16 Jul, 2006 1 commit
    • Eric Wong's avatar
      remove the glib library dependency · b59aa757
      Eric Wong authored
      We never used many features from it, so there's no point in
      keeping it and forcing people to install a non-standard library.
      It may be standard on many GNU/Linux distributions, but there
      are many other UNIXes out there.  This makes life much easier
      for people cross-compiling (like me :)
      
      git-svn-id: https://svn.musicpd.org/mpd/trunk@4361 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      b59aa757
  12. 14 Jul, 2006 2 commits
  13. 13 Jul, 2006 1 commit
  14. 16 Mar, 2006 1 commit
  15. 15 Nov, 2004 4 commits
  16. 11 Nov, 2004 1 commit
  17. 10 Nov, 2004 1 commit
  18. 03 Nov, 2004 1 commit
  19. 28 Oct, 2004 1 commit
  20. 14 Apr, 2004 1 commit
  21. 11 Apr, 2004 1 commit
  22. 10 Apr, 2004 1 commit
  23. 23 Feb, 2004 1 commit