aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputStream_http.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* remove clumsy strncpy useEric Wong2006-07-301-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | strncpy isn't really safe because it doesn't guarantee null termination, and we have had to work around it in several places. strlcpy (from OpenBSD) isn't great, either because it often leaves errors going unchecked (by truncating strings). So we'll add the pathcpy_trunc() function with is basically strlcpy with a hardcoded MAXPATHLEN as the limit, and we'll acknowledge truncation since we only work on paths and MAXPATHLEN should be set correctly by the system headers[1]. file-specific notes: inputStream_http: eyeballing the changes here, it seems to look alright but I haven't actually tested it myself. ls: don't even bother printing a file if the filename is too long (and when is it ever?) since we won't be able to read it anyways. metadataChunk: it's only metadata, and it's only for showin the user, so truncating it here souldn't be a big issue. memset to zero in init is unecessary, so lets not waste cycles [1] - If the system headers are screwed up, then we're majorly screwed regardless of what we do :x git-svn-id: https://svn.musicpd.org/mpd/trunk@4491 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Add mpd-indent.shAvuton Olrich2006-07-201-3/+3
| | | | | | 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
* Add mpd-indent.shAvuton Olrich2006-07-201-559/+589
| | | | | | 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
* sparse: ANSI-fy function declarationsEric Wong2006-07-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Change shank's email addressJ. Alexander Treuman2006-07-141-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@4333 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Huge header update, update the copyright and addAvuton Olrich2006-07-131-1/+1
| | | | | the GPL header where necessary git-svn-id: https://svn.musicpd.org/mpd/trunk@4317 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* inputStream_http: avoid printf, use our handy macros in log.hEric Wong2006-05-211-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@4210 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Applied a modified patch for bug 344, needs testing with ipv6Qball Cow2006-05-141-83/+69
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@4171 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* merge with mpd/trunk up to r3925Eric Wong2006-03-161-0/+14
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@3926 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* inputStream_http.c: speling fikcsesEric Wong2006-03-151-4/+4
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@3921 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* fix some parsing of http_prebuffer_sizeWarren Dukes2005-04-171-3/+3
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@3216 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* change the http identification string to package_name/package_versionWarren Dukes2005-01-231-1/+4
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@2896 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* fix oss_openDevice() to match the new openDevice callback protocol (w/o a ↵Warren Dukes2004-11-201-1/+2
| | | | | audioFormat argument) git-svn-id: https://svn.musicpd.org/mpd/trunk@2715 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* not too smart shank, forgetting to set default buffer sizes in inputStream_httpWarren Dukes2004-11-051-2/+2
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@2513 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* make http buffer and prebuffer size configurableWarren Dukes2004-11-021-10/+51
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@2479 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* merge shank-rewrite-config changesWarren Dukes2004-10-281-48/+60
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@2375 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* fix segfault when reconnecting to icecast server, this was due to error ↵Warren Dukes2004-10-261-1/+0
| | | | | sending metadata and not checking afterward if connection is open still git-svn-id: https://svn.musicpd.org/mpd/trunk@2349 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* stream name maybe icy-name or ice-name in the http headersWarren Dukes2004-10-251-1/+3
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@2339 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* fix bug #325Warren Dukes2004-10-181-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@2270 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* fix a bug in username and password parsing in http url'sWarren Dukes2004-07-181-2/+2
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1877 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* added http authentication: http://user:passwd@host/musicWarren Dukes2004-07-171-7/+54
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1872 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* don't use fucking sprintfWarren Dukes2004-06-211-3/+4
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1596 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* maybe this matters ?Warren Dukes2004-06-211-1/+2
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1595 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* maybe this fixes something ?Warren Dukes2004-06-211-2/+2
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1594 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* http proxy authentication, can someone test?Warren Dukes2004-06-201-11/+79
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1590 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* http proxy mostly working, need to implement http authenticationWarren Dukes2004-06-201-9/+42
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1588 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* fix qball's bug, crossfading playing with funny samplerateWarren Dukes2004-06-201-0/+50
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1585 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* include sys/time.hWarren Dukes2004-06-171-0/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1522 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* fix bug where inputStream_httpRead was returning 0 when cnnection closed,Warren Dukes2004-06-091-3/+4
| | | | | but data is still left in the buffer git-svn-id: https://svn.musicpd.org/mpd/trunk@1425 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* debug code for stream name/titleWarren Dukes2004-06-091-0/+6
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1415 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* remove metadata debugging codeWarren Dukes2004-06-071-2/+0
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1378 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* remove the initial and trailing ' from the icy StreamTitle that shoutcastWarren Dukes2004-06-071-2/+7
| | | | | likes to insert git-svn-id: https://svn.musicpd.org/mpd/trunk@1366 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* icy metadata! wahooWarren Dukes2004-06-071-17/+63
| | | | | still lots some debug code with print out's, so don't bitch about it! git-svn-id: https://svn.musicpd.org/mpd/trunk@1364 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* remove some debug codeWarren Dukes2004-06-011-3/+0
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1282 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* icyName fixWarren Dukes2004-06-011-4/+8
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1271 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* icynames are now copied to title of streamsWarren Dukes2004-05-311-9/+8
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1258 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* mp3 and ogg plugin stuffWarren Dukes2004-05-311-1/+3
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1245 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* put icyName debug infoWarren Dukes2004-05-241-0/+3
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1151 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* do input buffering in while sleeping loop of sending stuff to output bufferWarren Dukes2004-05-211-7/+7
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1125 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* more bug fixesWarren Dukes2004-05-201-2/+2
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1108 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* ogg stream playing! some non-blocking seek bug fixesWarren Dukes2004-05-201-0/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1105 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* todo updateWarren Dukes2004-05-191-0/+3
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1094 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* disable prebuffering in the beginning for nowWarren Dukes2004-05-181-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1068 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* streaming fixes and such, now it seems to work good, what an annoying bugWarren Dukes2004-05-181-41/+40
| | | | | to find git-svn-id: https://svn.musicpd.org/mpd/trunk@1066 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* rework stuff so that we can use mime-type of streams to detect type of fileWarren Dukes2004-05-181-21/+20
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1062 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* inputStream updates from httpTestWarren Dukes2004-05-181-38/+56
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1059 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* can parse inputStream_http can parse mime typeWarren Dukes2004-05-181-15/+47
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1056 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* bug fixes for playing streamsWarren Dukes2004-05-181-2/+4
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@1053 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* oops forgot to add theseWarren Dukes2004-05-181-0/+507
git-svn-id: https://svn.musicpd.org/mpd/trunk@1050 09075e82-0dd4-0310-85a5-a0d7c8717e4f