Michael Smith
f349c3bf3e
More path handling cleanups, and memory leak fixes.
...
svn path=/trunk/icecast/; revision=3804
2002-08-11 14:23:39 +00:00
Michael Smith
850cf995bf
URI decoding and path normalisation pass one (stuff needed for fileserving
...
later on)
svn path=/trunk/icecast/; revision=3803
2002-08-11 14:00:56 +00:00
Michael Smith
bf782f0248
Decrement client connections on source termination to avoid eventual "server
...
is full" messages.
svn path=/trunk/icecast/; revision=3801
2002-08-11 12:15:40 +00:00
Michael Smith
84a76ac3ee
status.xsl updates, better now.
...
Automatically create .m3u responses for any existing streams.
If /stream.ogg exists, you can now request /stream.ogg.m3u in your browser.
svn path=/trunk/icecast/; revision=3797
2002-08-10 08:01:56 +00:00
Michael Smith
e97e404904
Better error messages on some corrupt sources.
...
svn path=/trunk/icecast/; revision=3796
2002-08-10 04:51:11 +00:00
Michael Smith
5d06975c44
Various cleanups
...
svn path=/trunk/icecast/; revision=3791
2002-08-10 03:22:44 +00:00
Michael Smith
8bd8dbbe48
Another free->xmlFree change
...
svn path=/trunk/icecast/; revision=3785
2002-08-09 15:04:40 +00:00
Michael Smith
e42c65afa3
fix typo preventing compile
...
svn path=/trunk/icecast/; revision=3784
2002-08-09 15:03:32 +00:00
Michael Smith
c96ec5bab0
set default webroot dir correctly, and fix a minor memleak
...
svn path=/trunk/icecast/; revision=3782
2002-08-09 14:47:53 +00:00
Michael Smith
bf0f2e1414
rename transformXSLT to xslt_transform() for consistency with the rest
...
of the source.
svn path=/trunk/icecast/; revision=3781
2002-08-09 14:38:42 +00:00
Michael Smith
7f0230e8ea
Redo memory-management in config.c so that xmlFree() is called instead of
...
free(), hopefully fixing win32 segfaults.
svn path=/trunk/icecast/; revision=3780
2002-08-09 14:36:12 +00:00
Michael Smith
6357936028
Various cleanups for accounting of sent bytes.
...
Crash bug in stats fixed.
svn path=/trunk/icecast/; revision=3779
2002-08-09 14:15:08 +00:00
Michael Smith
5dd00e7423
Fix crash when socket couldn't be bound.
...
svn path=/trunk/icecast/; revision=3776
2002-08-09 13:14:59 +00:00
Michael Smith
0ecb66895a
Add new xslt files, which I forgot earlier
...
svn path=/trunk/icecast/; revision=3775
2002-08-09 08:16:51 +00:00
Michael Smith
fce9ecb952
Allow setting the log level (for the error log, not the access log) from the
...
config file.
svn path=/trunk/icecast/; revision=3774
2002-08-09 08:11:37 +00:00
Michael Smith
8d75eb0b4a
Logging cleanups, and a config file fix.
...
svn path=/trunk/icecast/; revision=3773
2002-08-09 08:06:00 +00:00
Michael Smith
9b6b2afeaf
oddsock's xslt stats support, slightly cleaned up
...
svn path=/trunk/icecast/; revision=3772
2002-08-09 06:52:07 +00:00
Michael Smith
f1dc57ae2b
Cleaned up version of Ciaran Anscomb's relaying patch.
...
svn path=/trunk/httpp/; revision=3760
2002-08-05 14:48:04 +00:00
Michael Smith
3727b2b32c
Updates for modified logging API.
...
svn path=/trunk/icecast/; revision=3752
2002-08-03 08:16:52 +00:00
Michael Smith
49e028cd02
Lots of patches committable now that my sound card works properly again.
...
logging API changed slightly (I got sick of gcc warnings about deprecated
features).
resampling (for live input, not yet for reencoding) is in there.
several patches from Karl Heyes have been incorporated.
svn path=/trunk/log/; revision=3751
2002-08-03 08:14:56 +00:00
Michael Smith
3e60ee06f6
Config fixes for when parsing fails
...
Don't needlessly call getsockopt() all the time (it's a system call, hence
expensive)
svn path=/trunk/icecast/; revision=3735
2002-07-31 15:00:12 +00:00
Michael Smith
59e523a023
Allow either poll or select to be used (based on whether HAVE_POLL is defined.)
...
Still need to make autoconf define HAVE_POLL where relevent.
svn path=/trunk/icecast/; revision=3717
2002-07-24 14:52:28 +00:00
Michael Smith
b45b6853da
Send the correct mimetype on client request.
...
svn path=/trunk/icecast/; revision=3716
2002-07-24 13:55:12 +00:00
Michael Smith
638ccabd55
MP3 support for icecast2.
...
- no title/metadata support
- requires modifications to source clients.
svn path=/trunk/icecast/; revision=3713
2002-07-23 15:15:11 +00:00
Michael Smith
9cf59b280c
Fix locations of headers.
...
svn path=/trunk/icecast/; revision=3439
2002-06-29 04:29:37 +00:00
Michael Smith
4703f764d7
fix previous fix.
...
svn path=/trunk/icecast/; revision=3391
2002-06-15 04:57:50 +00:00
Michael Smith
903abeb2a5
fixed crash in shutdown if startup didn't happen properly.
...
svn path=/trunk/icecast/; revision=3390
2002-06-15 04:54:43 +00:00
Michael Smith
8a4ae84dce
Fix for evil format string vulnerability - people, don't DO THIS!
...
Fix from Emil Styrke <emil@lysator.liu.se>
svn path=/trunk/icecast/; revision=3341
2002-06-03 09:12:50 +00:00
Michael Smith
92bb45ddc7
missing newlines. oops.
...
svn path=/trunk/icecast/; revision=3319
2002-05-21 05:22:32 +00:00
Michael Smith
fd2ee075f6
Fix segfault from called log functions before log was initialised.
...
svn path=/trunk/icecast/; revision=3316
2002-05-21 00:35:33 +00:00
Michael Smith
9414de162b
Fix potential problem which would occur if <changeuser> was set, but had
...
no <user> or no <group> element within it.
svn path=/trunk/icecast/; revision=3315
2002-05-21 00:05:31 +00:00
Michael Smith
86c78a6be9
chroot and setuid interacted badly in the previous version. Fixed now.
...
svn path=/trunk/icecast/; revision=3311
2002-05-20 13:25:31 +00:00
Michael Smith
4d884d832f
Ian Kumlien's security (chroot() and setuid() patch), with some modifications.
...
svn path=/trunk/icecast/; revision=3302
2002-05-14 11:06:54 +00:00
Michael Smith
669cfbd02f
I am an idiot.
...
svn path=/trunk/icecast/; revision=3292
2002-05-08 14:07:42 +00:00
Michael Smith
2ff217cb18
Minor fix to previous fix - use the right variable!
...
svn path=/trunk/icecast/; revision=3291
2002-05-08 14:02:02 +00:00
Michael Smith
2225738aba
Ensure we don't throw away a buffer after only sending part of it.
...
svn path=/trunk/icecast/; revision=3290
2002-05-08 05:18:43 +00:00
Michael Smith
59b605ec12
Memory leaks. Lots of little ones.
...
svn path=/trunk/httpp/; revision=3275
2002-05-03 15:04:56 +00:00
Michael Smith
0dbd488c17
Don't use start after freeing it in thread startup code.
...
svn path=/trunk/thread/; revision=3264
2002-04-30 06:50:47 +00:00
Jack Moffitt
338f6a0a31
Oddsock finally found the win32 crash bug. _event_listeners wasn't being
...
initialized (the first time it was NULL). After the server is restarted
it retained a pointer to freed memory. We should have been initializing
this anyway.
svn path=/trunk/icecast/; revision=3220
2002-04-05 16:33:35 +00:00
Michael Smith
ea47fdf504
Buffer overflows.
...
Requires a change to the format plugin interface - jack: if you want this
done differently, feel free to change it (or ask me to).
svn path=/trunk/httpp/; revision=3219
2002-04-05 09:28:26 +00:00
Jack Moffitt
235a2639cc
Ouch. Serious bug found by Ricardo Galli.
...
When the cond var is signalled it will wake up a thread. If all the
connection handler threads are handling connections, the signal will be
ignored and clients will 'pend' until another client causes the to signal
again.
We have to check to see if there are more pending connections before waiting
on the signal again.
svn path=/trunk/icecast/; revision=3178
2002-03-22 22:41:16 +00:00
Jack Moffitt
785cfefe3e
Ricardo Galli found this too. We weren't setting no linger and keepalive
...
as we used to in icecast1. They make things work a bit better.
svn path=/trunk/net/; revision=3177
2002-03-22 21:44:29 +00:00
Jack Moffitt
7bccdbd4f0
Fix comments (and remove old commented out code) from sock_write_bytes.
...
svn path=/trunk/net/; revision=3176
2002-03-22 21:24:57 +00:00
Jack Moffitt
d8559723fb
We were triggering error logic when no errors had occurred. Thanks
...
to Ricardo Galli for finding this bug.
svn path=/trunk/icecast/; revision=3175
2002-03-22 21:18:03 +00:00
Jack Moffitt
06fb100e10
Add error == 0 to recoverable error numbers. Patch from Ricardo Galli.
...
Minor style fixes.
svn path=/trunk/net/; revision=3174
2002-03-22 21:09:36 +00:00
Jack Moffitt
39635122a5
win32 patches from Ed
...
svn path=/trunk/icecast/; revision=3123
2002-03-05 23:59:38 +00:00
Michael Smith
cb9de1ee2a
Comment audio/mpeg out until it gets implemented, to avoid segfaults.
...
svn path=/trunk/icecast/; revision=3076
2002-02-19 22:01:51 +00:00
Jack Moffitt
3807800d82
Fix race condition on thread shutdown.
...
svn path=/trunk/icecast/; revision=3045
2002-02-14 00:41:57 +00:00
Jack Moffitt
12cbc0a29d
Shut down the stats_connection and stats_callback threads cleanly when
...
stats_shutdown() is called.
svn path=/trunk/icecast/; revision=3044
2002-02-14 00:28:41 +00:00
Michael Smith
cb398ff41c
Bunch of fixes:
...
- connections are now matched to format plugins based on content-type headers,
and are rejected if there isn't a format handler for that content-type, or
there is no content-type at all.
- format_vorbis now handles pages with granulepos of -1 in the headers
correctly (this happens if the headers are fairly large, because of
many comments, for example).
- various #include fixes.
- buffer overflow in httpp.c fixed.
svn path=/trunk/avl/; revision=3042
2002-02-11 09:11:18 +00:00
Jack Moffitt
4cc0705134
Minor cleanup of 'static' functions.
...
Fixed usage bug where usage wasn't getting displayed properly.
svn path=/trunk/icecast/; revision=3034
2002-02-08 03:59:17 +00:00
Jack Moffitt
7927f1d31f
More win32 fixes.
...
svn path=/trunk/icecast/; revision=3033
2002-02-08 03:51:19 +00:00
Jack Moffitt
4327a10e45
minor build fixes for win32 courtesy of Oddsock
...
svn path=/trunk/icecast/; revision=3029
2002-02-07 01:04:09 +00:00
Jack Moffitt
ab0f4cdda8
Factor out common code in stats.c.
...
svn path=/trunk/icecast/; revision=3027
2002-02-06 07:52:09 +00:00
Jack Moffitt
4144bb05fb
A very slightly modified version of oddsocks function to support gui
...
stats updates. Basically stats_connection() was copied to
stats_callback() (i should probably factor out some of the code here!)
with the change that instead of sending stats to a socket, it sends the
event to a callback function.
svn path=/trunk/icecast/; revision=3026
2002-02-06 06:11:03 +00:00
Jack Moffitt
c7aa89cf26
Two things:
...
1) vorbis tags (ARTIST and TITLE) now appear in the stats. Oddsock did
the first cut of this.
2) stats bug fixed. if a stats value was NULL a segfault occurred.
strdup(NULL) is fun!
svn path=/trunk/icecast/; revision=3024
2002-02-04 07:08:52 +00:00
Michael Smith
0512d524e4
Allow logging to go to stderr instead of to a file, if the user so chooses
...
(example configs turn this off, to leave behaviour as it was).
svn path=/trunk/log/; revision=3008
2002-01-29 09:20:28 +00:00
Jack Moffitt
34c6203669
Add a source-timeout config option and implement it. This prevents lame
...
sources from sticking around way too long. Default is 10 seconds.
svn path=/trunk/icecast/; revision=2968
2002-01-21 04:28:30 +00:00
Jack Moffitt
4d079ba4cc
Make it log to a file when the source gets disconnected
...
svn path=/trunk/icecast/; revision=2967
2002-01-21 03:56:16 +00:00
Jack Moffitt
b7a114a191
Fix a stupid but that Oddsock and Ciaran both found. When sources log in
...
we weren't checking to see if the mountpoint was already taken. Since
the mountpoint was the key in the avl tree, bad things happened.
svn path=/trunk/icecast/; revision=2966
2002-01-21 03:10:37 +00:00
Jack Moffitt
6c0132596f
Thanks to Ciaran for realizing that we werne't freeing the format plugins
...
memory on source exits. This caused a small but noticable memory leak.
The fix was to add a new method to the format_plugin object -
free_plugin() - and have the source thread call this on shutdown.
svn path=/trunk/icecast/; revision=2946
2002-01-05 00:29:27 +00:00
Jack Moffitt
cbbdb5fc49
Ciaran found this bug. We only ever set tv_usec, but for bitrates around
...
32 and lower, this will set tv_usec to > 1 second, which wrong. So we
do it the right way, and put seconds in tv_sec.
svn path=/trunk/timing/; revision=2507
2001-12-09 08:31:20 +00:00
Michael Smith
d22bb9a528
Major stability fixes, to make things work better on bad input. Stops some
...
memory leaks too, I think.
svn path=/trunk/log/; revision=2326
2001-11-10 04:47:25 +00:00
Jack Moffitt
c15a877085
Fix broken CFLAGS handling.
...
svn path=/trunk/icecast/; revision=2238
2001-10-21 16:13:02 +00:00
Jack Moffitt
c9fa9cd040
Fix lib handling.
...
svn path=/trunk/icecast/; revision=2235
2001-10-21 15:25:45 +00:00
Michael Smith
17e1289a89
configure.in: solaris requires -D_REENTRANT. What about other platforms?
...
source.c: fix bug in handling non-fatal errors like EAGAIN
svn path=/trunk/icecast/; revision=2225
2001-10-21 10:07:51 +00:00
Jack Moffitt
c98a76ebbd
Revert stacksize stuff and changes for the thread module.
...
svn path=/trunk/icecast/; revision=2223
2001-10-21 02:06:08 +00:00
Jack Moffitt
1902634e50
Revert the stacksize work. It's stupid.
...
The original patch from Ben Laurie some years ago was needed because
FreeBSD's default stack size was < 8k and this wasn't acceptable.
Both Linux and Solaris had reasonable defaults for stacksize, or grew the
stack as needed to a reasonable size.
Testing today and consulting documentation shows that the default stack
sizes on FreeBSD, Linux, and Solaris are all acceptable. Linux can grow
to 2MB, 32bit Solaris defaults to 1MB, 64bit Solaris defaults to 2MB, and
FreeBSD defaults to 64k.
In my opinion FreeBSD needs to get with the program and provide a
reasonable default. 64k is enough for us, but might not be for others.
svn path=/trunk/thread/; revision=2222
2001-10-21 02:04:27 +00:00
Jack Moffitt
42e869cd45
Fix icecast for changes in thread module regarding stacksize. For icecast,
...
the default stacksize is unchanged (8k) until further testing on Solaris
to determine if a larger value is needed.
svn path=/trunk/icecast/; revision=2221
2001-10-20 22:48:29 +00:00
Jack Moffitt
cdf8edb30c
Fix header definition.
...
svn path=/trunk/thread/; revision=2219
2001-10-20 22:40:28 +00:00
Jack Moffitt
62384d6730
Stack size per thread needs to be configurable. Setting it on a global
...
bases is not enough. ices and icecast need this to be different, and
if one is interested in tuning memory usage, one will want to alter this
per thread.
svn path=/trunk/thread/; revision=2217
2001-10-20 22:27:52 +00:00
Jack Moffitt
2223ecb8c5
Forgot to add new compat.h to Makefile.am. Fixed.
...
svn path=/trunk/icecast/; revision=2207
2001-10-20 21:29:16 +00:00
Jack Moffitt
42688a8366
Add check for stdint.h, since Solaris doesn't have it. This is needed
...
on Linux for uint64_t, but Solaris defines this in sys/types.h. Use check
where appropriate, and also add typedefs for Win32.
svn path=/trunk/icecast/; revision=2206
2001-10-20 21:28:09 +00:00
Jack Moffitt
9e6fddca93
Minor cleanup.
...
svn path=/trunk/log/; revision=2200
2001-10-20 16:47:01 +00:00
Jack Moffitt
3553fce604
Thanks to Akos Maroy <darkeye@tyrell.hu> for this. These variables need to
...
be uppercase always in order to comply with the HTTP specification.
While not a problem internal to icecast, they were slipping into the log
files and breaking some less-than-robust parsers.
svn path=/trunk/httpp/; revision=2197
2001-10-20 07:40:09 +00:00
Jack Moffitt
632c1e57fb
It's too bad we don't have a commit script that smacks me upside the head
...
when I do stupid things like this.
svn path=/trunk/icecast/; revision=2196
2001-10-20 06:51:29 +00:00
Jack Moffitt
8f6c02365d
Win32 fixes. Look how portable this was ;) Just header stuff and some defines.
...
Whee!
svn path=/trunk/icecast/; revision=2195
2001-10-20 06:43:04 +00:00
Jack Moffitt
71539aa447
Win32 updates. Mostly header fixes and defines for windows. Apparently
...
interface is a reserved word, so we've renamed one variable. There's
also no sethostent on win32, and Oddsock seems to think we need
DeleteCriticalSection instead of DestroyCriticalSection. I was unable
to figure out from msdn.microsoft.com why this was, but I'll trust
Oddsock's judgement.
svn path=/trunk/net/; revision=2194
2001-10-20 05:57:28 +00:00
Jack Moffitt
5d78cb3bd6
Win32 fixes. Specifically a header change and not using the gcc extensions
...
for vararg macros. It's not as pretty, but it works.
svn path=/trunk/thread/; revision=2193
2001-10-20 05:35:30 +00:00
Jack Moffitt
f69b99f1c8
Microsoft has '_' in front of random functions. We typedef this away.
...
svn path=/trunk/log/; revision=2192
2001-10-20 05:13:12 +00:00
Jack Moffitt
64942a4113
select first argument should be 0 when we use it for sleeping.
...
svn path=/trunk/timing/; revision=2191
2001-10-20 05:05:19 +00:00
Jack Moffitt
5a4f55d74c
Change long long to the more standard uint64_t. This will need to be
...
typedefed for some platforms.
svn path=/trunk/timing/; revision=2190
2001-10-20 05:03:24 +00:00
Jack Moffitt
5c1e963203
Win32 compatibility courtesy of Oddsock.
...
svn path=/trunk/httpp/; revision=2188
2001-10-20 04:41:54 +00:00
Jack Moffitt
1656225439
Oddsock found this bug when working with icecast2 on freebsd. Nanoseconds
...
were off by a few orders of magnitude.
svn path=/trunk/thread/; revision=2187
2001-10-20 03:39:10 +00:00
Michael Smith
9d87eecd0f
Open logs in line-buffered mode, so that logging is actually useful.
...
svn path=/trunk/log/; revision=2075
2001-09-23 10:07:06 +00:00
Jack Moffitt
6c296ff020
.cvsignore is fun!
...
svn path=/trunk/avl/; revision=2006
2001-09-10 03:04:11 +00:00
Jack Moffitt
abb2a595fc
Still more .cvsignore
...
svn path=/trunk/avl/; revision=2005
2001-09-10 03:00:41 +00:00
Jack Moffitt
d7bfccb5a8
.cvsignore stuff
...
svn path=/trunk/icecast/; revision=2004
2001-09-10 03:02:23 +00:00
Jack Moffitt
6009622745
More .cvsignore
...
svn path=/trunk/avl/; revision=2001
2001-09-10 02:58:24 +00:00
Jack Moffitt
73a606c8b1
Initial revision
...
svn path=/trunk/avl/; revision=1997
2001-09-10 02:24:39 +00:00
Jack Moffitt
61316a25d7
Initial revision
...
svn path=/trunk/icecast/; revision=1996
2001-09-10 02:21:46 +00:00