Commit Graph

297 Commits

Author SHA1 Message Date
Eric Wong 90847fc881 Replace strdup and {c,re,m}alloc with x* variants to check for OOM errors
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
2006-08-26 06:25:57 +00:00
Avuton Olrich f79a70d1b9 Fix warnings for -Wmissing-prototypes
Add -Wmissing-prototypes if compiling with gcc
Static where possible

git-svn-id: https://svn.musicpd.org/mpd/trunk@4657 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-20 00:50:44 +00:00
Eric Wong 6459b3ee29 Revert leaks from r4311, and also the leak fixes as a result of that
utf8ToFsCharset() and fsCharsetToUtf8() got very broken in r4311, and
resulted in several commits to fix those leaks.  Unfortunately, not all
of those newly introduced leaks were fixed, nor was the result pretty.

Also, fixed a double-free in lsPlaylists().  This is very hard
to trigger (and therefore exploit) at the moment because we
check printDirectoryInfo() beforehand.

Intended behavior for utf8ToFsCharset() and fsCharsetToUtf8() as
God^H^H^Hshank originally intended is now documented in path.h
to prevent future errors like this.

mpd could still use some good valgrind testing before the 0.12.0
release.

<plug>In addition to reducing heap fragmentation, malloc
reductions from mpd-ke greatly reduces the chance of leaks from
happening due to programming errors.</plug>

git-svn-id: https://svn.musicpd.org/mpd/trunk@4639 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-14 13:46:51 +00:00
Eric Wong 12aec5738b Standardize state_file handling routines.
This way it's easier to manage and extend.

git-svn-id: https://svn.musicpd.org/mpd/trunk@4494 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-30 23:32:47 +00:00
Eric Wong 381d7232a0 remove deprecated myfprintf wrapper
This shaves another 5-6k because we've removed the paranoid
fflush() calls after every fprintf.  Now we only fflush()
when we need to

git-svn-id: https://svn.musicpd.org/mpd/trunk@4493 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-30 23:32:39 +00:00
Eric Wong e86fd65c81 commandError() cleanups, fixup gcc checks
stripped binary size reduced by 9k on my machine from making
commandError a function.  We'll print out error messages slightly
slower before, but the smaller binary is more than worth it.

git-svn-id: https://svn.musicpd.org/mpd/trunk@4488 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-30 08:47:50 +00:00
Eric Wong 4cf5d04ca1 interface/connection malloc reductions from mpd-ke
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
2006-07-30 03:43:38 +00:00
J. Alexander Treuman 22b16884a2 Use AudioCompress for volume normalization
git-svn-id: https://svn.musicpd.org/mpd/trunk@4474 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-27 00:50:59 +00:00
J. Alexander Treuman c379533ba9 Fix a memory leak when removing a playlist
git-svn-id: https://svn.musicpd.org/mpd/trunk@4422 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-21 17:53:36 +00:00
J. Alexander Treuman 688166295a Remember kids: always test your code before committing
git-svn-id: https://svn.musicpd.org/mpd/trunk@4420 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-21 17:34:50 +00:00
J. Alexander Treuman 6dbacc71c7 Make getBoolConfigParam and save_absolute_paths_in_playlist less stupid
git-svn-id: https://svn.musicpd.org/mpd/trunk@4419 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-21 17:20:38 +00:00
J. Alexander Treuman ac7ef037b5 Use getBoolConfigParam for save_absolute_paths_in_playlist
git-svn-id: https://svn.musicpd.org/mpd/trunk@4418 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-21 17:11:45 +00:00
Avuton Olrich 00e67be7c9 Add mpd-indent.sh
Add a few new options for indent to try to make
things a bit cleaner

git-svn-id: https://svn.musicpd.org/mpd/trunk@4411 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-20 18:53:56 +00:00
Avuton Olrich 29a25b9933 Add mpd-indent.sh
Indent the entire tree, hopefully we can keep
it indented.

git-svn-id: https://svn.musicpd.org/mpd/trunk@4410 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-20 16:02:40 +00:00
Eric Wong a234780aab sparse: ANSI-fy function declarations
These are just warnings from sparse, but it makes the output
easier to read.  I ran this through a quick perl script, but
of course verified the output by looking at the diff and making
sure the thing still compiles.

here's the quick perl script I wrote to generate this patch:
----------- 8< -----------
use Tie::File;
defined(my $pid = open my $fh, '-|') or die $!;
if (!$pid) {
open STDERR, '>&STDOUT' or die $!;
exec 'sparse', @ARGV or die $!;
}
my $na = 'warning: non-ANSI function declaration of function';
while (<$fh>) {
print STDERR $_;
if (/^(.+?\.[ch]):(\d+):(\d+): $na '(\w+)'/o) {
my ($f, $l, $pos, $func) = ($1, $2, $3, $4);
$l--;
tie my @x, 'Tie::File', $f or die "$!: $f";
print '-', $x[$l], "\n";
$x[$l] =~ s/\b($func\s*)\(\s*\)/$1(void)/;
print '+', $x[$l], "\n";
untie @x;
}
}

git-svn-id: https://svn.musicpd.org/mpd/trunk@4378 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-17 00:15:34 +00:00
J. Alexander Treuman 25c37e9276 Sigh, another memory leak
git-svn-id: https://svn.musicpd.org/mpd/trunk@4374 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-16 19:40:09 +00:00
J. Alexander Treuman 93c8aa8b71 Fixing what looks like a *huge* memory leak
git-svn-id: https://svn.musicpd.org/mpd/trunk@4372 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-16 19:00:52 +00:00
J. Alexander Treuman 5d1df8e25c Fixing a whopping 4 memory leaks
git-svn-id: https://svn.musicpd.org/mpd/trunk@4371 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-16 18:22:03 +00:00
Avuton Olrich d0c08c5218 [CLEANUP] cleanup whitespace -> tabs
static where it makes sense

git-svn-id: https://svn.musicpd.org/mpd/trunk@4344 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-14 21:01:19 +00:00
J. Alexander Treuman 2fa7125cce Change shank's email address
git-svn-id: https://svn.musicpd.org/mpd/trunk@4333 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-14 19:37:45 +00:00
Avuton Olrich a37348a74f Huge header update, update the copyright and add
the GPL header where necessary

git-svn-id: https://svn.musicpd.org/mpd/trunk@4317 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-13 19:20:34 +00:00
J. Alexander Treuman 7b35cfe2ac Remove superfluous \n from addid's commandError call.
git-svn-id: https://svn.musicpd.org/mpd/trunk@4208 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-05-20 20:07:15 +00:00
Qball Cow 151d9706e9 Commit Jat's patch for bug 1282
git-svn-id: https://svn.musicpd.org/mpd/trunk@4137 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-05-08 08:15:24 +00:00
Qball Cow 37c9265357 Commit Jat's patch for bug 1281
git-svn-id: https://svn.musicpd.org/mpd/trunk@4136 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-05-08 08:14:37 +00:00
Qball Cow 5416d00bcd Adding of plchangesposid command, this is a stripped down version of the plchanges command, it only sends the pos and id of the changed command. Libmpd allready has support for it, and libmpdclient in libmpd too
git-svn-id: https://svn.musicpd.org/mpd/trunk@4101 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-04-23 11:10:41 +00:00
Eric Wong 171e1e9d72 src/playlist.c: remove unnecessary strdup()
Yes, I know about what I said on IRC earlier, but this
is an allocation + free inside a loop.

git-svn-id: https://svn.musicpd.org/mpd/trunk@3953 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-03-26 19:31:22 +00:00
Qball Cow a2a2364b45 Small fix, it's file: test not file:test
git-svn-id: https://svn.musicpd.org/mpd/trunk@3948 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-03-26 14:06:48 +00:00
Qball Cow 09929b6f82 Support for fetching the content of a stored playlist (patch by qball), this adds listPlaylist and listPlaylistInfo
git-svn-id: https://svn.musicpd.org/mpd/trunk@3947 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-03-26 13:46:05 +00:00
Warren Dukes fa08a7e3ff for windows compatibility, if we're unable to add a song, convert '\' to '/' and try again to add the file
git-svn-id: https://svn.musicpd.org/mpd/trunk@3036 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2005-03-08 01:07:46 +00:00
Warren Dukes 32a1f952e8 fix stateFile path getting garbled
git-svn-id: https://svn.musicpd.org/mpd/trunk@3029 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2005-03-06 20:04:50 +00:00
Warren Dukes 4ec3df0339 implement saved memory by not storing full path
git-svn-id: https://svn.musicpd.org/mpd/trunk@2601 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-11-11 02:36:25 +00:00
Warren Dukes f468aba16e new command "addid", this is the same as "add" command, except it also returns the songid of the added song. Note that "addid" does not work on directories
git-svn-id: https://svn.musicpd.org/mpd/trunk@2487 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-11-02 23:44:33 +00:00
Warren Dukes ebc4418e01 oops, a typo, but that's ok, i'm still da man
git-svn-id: https://svn.musicpd.org/mpd/trunk@2468 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-11-02 05:30:16 +00:00
Warren Dukes 1d939538eb a few extra strerror()'s sprinkled in the code
git-svn-id: https://svn.musicpd.org/mpd/trunk@2467 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-11-02 05:29:22 +00:00
Warren Dukes 38ade145bc use random() instead of rand()
git-svn-id: https://svn.musicpd.org/mpd/trunk@2420 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-10-30 14:33:19 +00:00
Warren Dukes 94ee53178d oops, forgot the parse the state_file as a path
git-svn-id: https://svn.musicpd.org/mpd/trunk@2383 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-10-28 17:16:55 +00:00
Warren Dukes 58dbe4bb5d merge shank-rewrite-config changes
git-svn-id: https://svn.musicpd.org/mpd/trunk@2375 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-10-28 05:14:55 +00:00
Warren Dukes 481a96ec40 #1) Fix a potential security hole, where mpd sends a line from a playlist to a client if the line is too long. But this is a rare circumstance, since the file would need to have a .m3u suffix and the line would need to be very long.
#2) Fix qball's bug, basically when we try todo initial buffering in decodeStart(), sleep for a few seconds after each attempt to finish init'ing the connection and begin buffering.

git-svn-id: https://svn.musicpd.org/mpd/trunk@2236 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-10-16 12:22:19 +00:00
Warren Dukes c0e0c2460f fix bug #307
git-svn-id: https://svn.musicpd.org/mpd/trunk@2230 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-10-15 18:27:29 +00:00
Warren Dukes 9e246a6ab2 rename idToNum and numToId to idToPostion and positionToId - from tw-nym
git-svn-id: https://svn.musicpd.org/mpd/trunk@1734 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-30 02:12:49 +00:00
Warren Dukes 188011ac52 patch from np for orderPlaylist()
git-svn-id: https://svn.musicpd.org/mpd/trunk@1673 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-26 04:34:28 +00:00
Warren Dukes a5bdf6aaeb fix move command
git-svn-id: https://svn.musicpd.org/mpd/trunk@1574 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-19 23:43:46 +00:00
Warren Dukes 80dd76db7f fix C99 stuff for commandError
also some slight optimizations to interfacePrintWithFD() and myfprintf()

git-svn-id: https://svn.musicpd.org/mpd/trunk@1503 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-15 18:06:21 +00:00
Warren Dukes 5bd18af775 forget to set playlist.current = 0 when toggling random
and doing swapOrder(playlist.current, 0)

git-svn-id: https://svn.musicpd.org/mpd/trunk@1480 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-14 17:01:40 +00:00
Warren Dukes 17c13ea0e8 bug fix for deleting a song when the last song or next to last song is playing and causing playlist.current to be set to -1
git-svn-id: https://svn.musicpd.org/mpd/trunk@1479 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-14 15:29:55 +00:00
Warren Dukes c637238aba change 'Num' => 'Pos" for position
git-svn-id: https://svn.musicpd.org/mpd/trunk@1455 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-13 12:04:07 +00:00
Warren Dukes 43255a7f63 since stuff like vorbis streams report actual time into stream,
not time played, for previous add a hack where we record the difference
in time between previous presses

git-svn-id: https://svn.musicpd.org/mpd/trunk@1440 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-10 21:42:20 +00:00
Warren Dukes d217505dc6 implemented songid commands: playlistid, playid, seekid, deleteid, moveid, swapid
git-svn-id: https://svn.musicpd.org/mpd/trunk@1408 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-09 02:50:44 +00:00
Warren Dukes 304639c9a6 implmented ID functions, need to implemented id commands
git-svn-id: https://svn.musicpd.org/mpd/trunk@1407 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-09 01:30:51 +00:00
Warren Dukes 1ca828c49d implemented song id's
now we just need to implement id commands

git-svn-id: https://svn.musicpd.org/mpd/trunk@1405 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-09 00:18:31 +00:00
Warren Dukes d0968e0140 fix ack error when attempt to save a playlist that already exists
git-svn-id: https://svn.musicpd.org/mpd/trunk@1402 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-08 22:43:25 +00:00
Warren Dukes adc11cb8aa on random select, move current to the first song played
git-svn-id: https://svn.musicpd.org/mpd/trunk@1401 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-08 20:16:28 +00:00
Warren Dukes 4959c30678 make enabling random always randomize the entire playlist
git-svn-id: https://svn.musicpd.org/mpd/trunk@1400 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-08 20:12:10 +00:00
Warren Dukes 33f21b9374 spelling fix for avuton
git-svn-id: https://svn.musicpd.org/mpd/trunk@1361 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-06 21:37:12 +00:00
Warren Dukes 81720da06d slightly safer copying of metadataChunk to MpdTag
git-svn-id: https://svn.musicpd.org/mpd/trunk@1359 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-06 20:34:00 +00:00
Warren Dukes b29f73c819 mechanism for updating metadata while decoding
vorbis comments are updated on the fly for streams
need to decode icy metadata
buffering of metadata needs to be hardened, to ensure that player has already read a particular metachunk or passed over it

git-svn-id: https://svn.musicpd.org/mpd/trunk@1358 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-06 19:41:03 +00:00
Warren Dukes c2c34f78dd new command, plchanges, and also add Num: to songinfo of playlistinfo
git-svn-id: https://svn.musicpd.org/mpd/trunk@1339 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-05 01:14:37 +00:00
Warren Dukes 9108df97a0 remove ickiness ness with play on a non existing file setting playlist_state to stop
git-svn-id: https://svn.musicpd.org/mpd/trunk@1329 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-04 03:15:37 +00:00
Warren Dukes 7d0ffc96e1 simple fix for play -1
git-svn-id: https://svn.musicpd.org/mpd/trunk@1328 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-04 03:10:54 +00:00
Warren Dukes 630d33b234 finish ack error codes
git-svn-id: https://svn.musicpd.org/mpd/trunk@1325 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-04 02:51:54 +00:00
Warren Dukes f958e0a4c5 work on ACK error codes
git-svn-id: https://svn.musicpd.org/mpd/trunk@1324 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-04 01:58:31 +00:00
Warren Dukes ef6c500edb clean up ACK error coding a little bit
git-svn-id: https://svn.musicpd.org/mpd/trunk@1321 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-04 00:49:33 +00:00
Warren Dukes c453f7dc52 remove debug code, and preivous commit fixes a segfault due to a doble free on an error trying to decode mp3's
git-svn-id: https://svn.musicpd.org/mpd/trunk@1314 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-03 02:58:41 +00:00
Warren Dukes 15c61f6eb0 don't stop on play command!
git-svn-id: https://svn.musicpd.org/mpd/trunk@1313 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-03 02:56:26 +00:00
Warren Dukes 8fca32b12d fix a segfault when deleteing the last song in the playlist and sync'ing metadata from the player
git-svn-id: https://svn.musicpd.org/mpd/trunk@1306 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-02 20:40:30 +00:00
Warren Dukes 24b7ce4f3b when at the end of the playlist with and not repeat, on next, set current = -1
git-svn-id: https://svn.musicpd.org/mpd/trunk@1290 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-02 01:42:09 +00:00
Warren Dukes efe8a04c70 validate url's before adding to playlist
git-svn-id: https://svn.musicpd.org/mpd/trunk@1289 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-02 01:26:15 +00:00
Warren Dukes 3520a93bc2 not sure if i changed anything, but what the hey
git-svn-id: https://svn.musicpd.org/mpd/trunk@1285 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-01 14:16:17 +00:00
Warren Dukes 199ad37e22 more efficient of updating of metadata
git-svn-id: https://svn.musicpd.org/mpd/trunk@1277 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-01 10:28:06 +00:00
Warren Dukes 000e053ce7 icynames are now copied to title of streams
git-svn-id: https://svn.musicpd.org/mpd/trunk@1258 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-05-31 11:42:46 +00:00
Warren Dukes ded15bf118 fix avuton's mp4 compile bug
git-svn-id: https://svn.musicpd.org/mpd/trunk@1253 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-05-31 03:18:30 +00:00
Warren Dukes 82f6f5b7a3 clear playlist.current on clearPlaylist()
git-svn-id: https://svn.musicpd.org/mpd/trunk@1163 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-05-25 20:02:19 +00:00
Warren Dukes 121e2063e0 fix for floating point exception when adding randomly to the playlist with
only one thing in the playlist or playing the last song in the playlist

git-svn-id: https://svn.musicpd.org/mpd/trunk@1162 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-05-25 19:50:05 +00:00
Warren Dukes 2a76d4c8cf mem leak: forgot to free stream songs on clearPlaylist() and finishPlaylist()
git-svn-id: https://svn.musicpd.org/mpd/trunk@1160 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-05-25 19:01:58 +00:00
Warren Dukes 4a541faf12 by popular demand: have stop remember the current song and play will start
playing from the stopped song.

git-svn-id: https://svn.musicpd.org/mpd/trunk@1139 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-05-23 14:12:05 +00:00
Warren Dukes 426889778d when playing a url, previous always goto to previous song and never to the
beginning of the stream!

git-svn-id: https://svn.musicpd.org/mpd/trunk@1110 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-05-20 04:47:15 +00:00
Warren Dukes 33faf9812c fix a nasty bug when deleting a stream from the playlist
git-svn-id: https://svn.musicpd.org/mpd/trunk@1082 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-05-19 05:07:31 +00:00
Warren Dukes bf9e2afbf9 just a we bit of changes
git-svn-id: https://svn.musicpd.org/mpd/trunk@1075 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-05-19 00:34:26 +00:00
Warren Dukes 965e6edcf1 redimentary addition of url's to playlist
git-svn-id: https://svn.musicpd.org/mpd/trunk@1000 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-05-13 18:46:38 +00:00
Warren Dukes 8c484eeccf add type element to Song struct, and change utf8file to utf8url
git-svn-id: https://svn.musicpd.org/mpd/trunk@999 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-05-13 18:16:03 +00:00
Warren Dukes df3af7d4f1 clean up a little bit main() code
git-svn-id: https://svn.musicpd.org/mpd/trunk@771 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-04-15 03:26:15 +00:00
Warren Dukes 549344d38a add vim shiznit to end of all source files
git-svn-id: https://svn.musicpd.org/mpd/trunk@750 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-04-14 14:53:41 +00:00
Warren Dukes 860f8bda71 ok, rework myfprintf so it uses write() and never use any file stream
print functions.  this way we can always know wtf is going on!
also, remove some places where we were using fprintf and printf instead of
myfprintf

git-svn-id: https://svn.musicpd.org/mpd/trunk@734 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-04-13 19:08:38 +00:00
Warren Dukes 1004890e25 lots of fsCharset, utf8/ascii converting clean-up and robustness stuff
Also, if fsCharsetToUtf8 can't convert to valid UTF-8, then don't add
it to the db, this way clients don't have to worry about weirdness and it
will force ppl to convert it.

git-svn-id: https://svn.musicpd.org/mpd/trunk@711 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-04-13 04:59:57 +00:00
Warren Dukes ae33b348af clean up signal handling using a polling method, from the genius that is mackstann
git-svn-id: https://svn.musicpd.org/mpd/trunk@697 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-04-11 23:07:43 +00:00
Warren Dukes 30d9589cb3 fix some snafoos
git-svn-id: https://svn.musicpd.org/mpd/trunk@678 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-04-11 04:15:14 +00:00
Warren Dukes 4844e05e65 don't stop playlist on finishPlaylist()[D
git-svn-id: https://svn.musicpd.org/mpd/trunk@677 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-04-11 04:05:12 +00:00
Warren Dukes 12ee016607 make "update" command background/non-blocking
git-svn-id: https://svn.musicpd.org/mpd/trunk@665 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-04-11 01:53:25 +00:00
Warren Dukes 785cdb0114 use EXIT_SUCCESS and EXIT_FAILURE
git-svn-id: https://svn.musicpd.org/mpd/trunk@591 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-04-02 23:34:16 +00:00
Warren Dukes a67538178d fix for loading playlists on platforms where char is unsigned (like PPC)
git-svn-id: https://svn.musicpd.org/mpd/trunk@560 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-03-31 17:09:16 +00:00
Warren Dukes 12d19cccd2 close audio device on pause, after we say we have paused, makes pause seem
more responsive

git-svn-id: https://svn.musicpd.org/mpd/trunk@504 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-03-26 22:25:01 +00:00
Warren Dukes 290102fddd make playlist restart from current position in song when using state file
git-svn-id: https://svn.musicpd.org/mpd/trunk@269 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-03-17 20:58:09 +00:00
Warren Dukes 31d44ea775 remove some no longer used functions
git-svn-id: https://svn.musicpd.org/mpd/trunk@242 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-03-10 10:08:10 +00:00
Warren Dukes 936d53bc61 make a set of nested if statements less ambigous
git-svn-id: https://svn.musicpd.org/mpd/trunk@209 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-03-05 19:05:23 +00:00
Warren Dukes 9d4bc4efea finally found the segfault, it occurs with random and repeat on,
in queueNextSong() was doing randomizeOrder(0,playlist.length)
instead of playlist.length-1

git-svn-id: https://svn.musicpd.org/mpd/trunk@61 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-02-25 22:00:21 +00:00
Warren Dukes 8edc416344 some more cleanups
git-svn-id: https://svn.musicpd.org/mpd/trunk@60 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-02-25 21:10:56 +00:00
Warren Dukes d35747a40c import from SF CVS
git-svn-id: https://svn.musicpd.org/mpd/trunk@1 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-02-23 23:41:20 +00:00