1. 16 Dec, 2008 1 commit
  2. 31 Oct, 2008 1 commit
    • Max Kellermann's avatar
      added prefix to header macros · ea515494
      Max Kellermann authored
      "LOG_H" is a macro which is also used by ffmpeg/log.h.  This is
      ffmpeg's fault, because short macros should be reserved for
      applications, but since it's always a good idea to choose prefixed
      macro names, even for applications, we are going to do that in MPD.
      ea515494
  3. 15 Oct, 2008 2 commits
    • Max Kellermann's avatar
      playlist: added support for adding songs not in the music database · 8c0060fa
      Max Kellermann authored
      Clients which have authenticated via unix socket may add local files
      to the MPD playlist, provided that they own the file.
      8c0060fa
    • Max Kellermann's avatar
      song: added song_in_database() · 6d3488c8
      Max Kellermann authored
      Some functions assume that a song is not in the database when it is a
      remote song.  Based on that, they decide whether they are responsible
      for freeing the song struct.  Add a special function which checks
      whether a song is in the database (currently equal to song_is_file()).
      6d3488c8
  4. 14 Oct, 2008 1 commit
  5. 08 Oct, 2008 8 commits
  6. 07 Oct, 2008 2 commits
    • Max Kellermann's avatar
      song: really make the song struct non-packed · 46eda29d
      Max Kellermann authored
      Somehow I must have missed this in commit 22e40b61.
      46eda29d
    • Eric Wong's avatar
      directory: serialize song deletes from playlist during update · 7d8c9cc7
      Eric Wong authored
      This makes the update code thread-safe and doesn't penalize
      the playlist code by complicating it with complicated and
      error-prone locks (and the associated overhead, not everybody
      has a thread-implementation as good as NPTL).
      
      The update task blocks during the delete; but the update task is
      a slow task anyways so we can block w/o people caring too much.
      
      This was also our only freeSong call site, so remove that
      function.
      
      Note that deleting entire directories is not fully thread-safe,
      yet; as their traversals are not yet locked.
      7d8c9cc7
  7. 06 Oct, 2008 4 commits
    • Eric Wong's avatar
      song: stop storing song_type · f1c53fe0
      Eric Wong authored
      We already know if a song is a URL or not based on whether it
      has parentDir defined or not.  Hopefully one day in the future
      we can drop HTTP support from MPD entirely when an HTTP
      filesystem comes along and we can access streams via open(2).
      f1c53fe0
    • Max Kellermann's avatar
      song: don't make the struct packed · 22e40b61
      Max Kellermann authored
      The "packed" attribute may have negative side effects on performance.
      Remove the "packed" attribute, and increase the size of "song.url" to
      a multiple of the machine word size.
      22e40b61
    • Eric Wong's avatar
      song: use flex arrays to store song->url · 267b2cd6
      Eric Wong authored
      Reduce the number of allocations we make, so there's less
      pressure on the allocator and less overhead to keep track
      of the allocations in.
      267b2cd6
    • Eric Wong's avatar
      song: get rid of newNullSong() · 43761441
      Eric Wong authored
      It didn't save us any lines of code nor did it do anything
      useful since we would overwrite everything anyways.
      43761441
  8. 29 Sep, 2008 3 commits
    • Max Kellermann's avatar
      assume stdint.h and stddef.h are available · a7651b9d
      Max Kellermann authored
      Since we use a C99 compiler now, we can assert that the C99 standard
      headers are available, no need for complicated compile time checks.
      Kill mpd_types.h.
      a7651b9d
    • Max Kellermann's avatar
      song: converted "type" to enum · 35d51962
      Max Kellermann authored
      Having an enum type is much nicer than an anonymous integer plus CPP
      macros.  Note that the old code didn't save any space by declaring the
      variable 8 bit, due to padding.
      35d51962
    • Max Kellermann's avatar
      switch to C99 types, part II · 226d52b3
      Max Kellermann authored
      Do full C99 integer type conversion in all modules which were not
      touched by Eric's merged patch.
      226d52b3
  9. 26 Sep, 2008 1 commit
  10. 07 Sep, 2008 2 commits
  11. 06 Sep, 2008 1 commit
  12. 29 Aug, 2008 2 commits
  13. 12 Apr, 2008 1 commit
  14. 05 Feb, 2008 1 commit
  15. 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
  16. 28 Dec, 2007 1 commit
    • Eric Wong's avatar
      Merge branches/ew r7104 · b79f6b88
      Eric Wong authored
      thread-safety work in preparation for rewrite to use pthreads
      
      Expect no regressions against trunk (r7078), possibly minor
      performance improvements in update (due to fewer heap
      allocations), but increased stack usage.
      
      Applied the following patches:
      
      * maxpath_str for reentrancy (temporary fix, reverted)
      * path: start working on thread-safe variants of these methods
      * Re-entrancy work on path/character-set conversions
      * directory.c: exploreDirectory() use reentrant functions here
      * directory/update: more use of reentrant functions + cleanups
      * string_toupper: a strdup-less version of strDupToUpper
      * get_song_url: a static-variable-free version of getSongUrl()
      * Use reentrant/thread-safe get_song_url everywhere
      * replace rmp2amp with the reentrant version, rmp2amp_r
      * Get rid of the non-reentrant/non-thread-safe rpp2app, too.
      * buffer2array: assert strdup() returns a usable value in unit tests
      * replace utf8ToFsCharset and fsCharsetToUtf8 with thread-safe variants
      * fix storing playlists w/o absolute paths
      * parent_path(), a reentrant version of parentPath()
      * parentPath => parent_path for reentrancy and thread-safety
      * allow "make test" to automatically run embedded unit tests
      * remove convStrDup() and maxpath_str()
      * use MPD_PATH_MAX everywhere instead of MAXPATHLEN
      * path: get rid of appendSlash, pfx_path and just use pfx_dir
      * get_song_url: fix the ability to play songs in the top-level music_directory
      
      git-svn-id: https://svn.musicpd.org/mpd/trunk@7106 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      b79f6b88
  17. 05 Apr, 2007 1 commit
  18. 27 Oct, 2006 1 commit
  19. 20 Aug, 2006 1 commit
  20. 30 Jul, 2006 1 commit
    • Eric Wong's avatar
      interface/connection malloc reductions from mpd-ke · 4cf5d04c
      Eric Wong authored
      This patch massively reduces the amount of heap allocations at
      the interface/command layer.  Most commands with minimal output
      should not allocate memory from the heap at all.  Things like
      repeatedly polling status, currentsong, and volume changes
      should be faster as a result, and more importantly, not a source
      of memory fragmentation.
      
      These changes should be safe in that there's no way for a
      remote-client to corrupt memory or otherwise do bad stuff to
      MPD, but an extra set of eyes to review would be good.  Of
      course there's never any warranty :)
      
      No longer do we use FILE * structures in the interface, which means
      we don't have to allocate any new memory for most connections.
      
      Now, before you go on about losing the buffering that FILE *
      +implies+, remember that myfprintf() never took advantage of
      any of the stdio buffering features.
      
      To reduce the diff and make bugs easier to spot in the diff,
      I've kept myfprintf in places where we write to files (and not
      network interfaces).  Expect myfprintf to go away entirely soon
      (we'll use fprintf for writing regular files).
      
      git-svn-id: https://svn.musicpd.org/mpd/trunk@4483 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      4cf5d04c
  21. 20 Jul, 2006 1 commit
  22. 15 Jul, 2006 1 commit
  23. 14 Jul, 2006 1 commit
  24. 13 Jul, 2006 1 commit