Karl Heyes
916a4a4cd1
update to server side socket creation. Where IPv6-aware functions are available,
...
use them to create dual IPv4/6 capable sockets.
svn path=/icecast/trunk/net/; revision=13491
2007-08-09 03:19:24 +00:00
Karl Heyes
e663a238ee
prevent race case when dealing with shoutcast style source clients and update
...
response headers to those clients.
svn path=/icecast/trunk/icecast/; revision=13490
2007-08-09 02:51:53 +00:00
moritz
d8fafe1935
Only define [u]int64_t on Windows if they haven't been defined already (e.g. in
...
os.h from libshout or stdint.h in case they ever show up there.)
ok msmith
svn path=/icecast/trunk/timing/; revision=12663
2007-03-06 13:35:29 +00:00
Michael Smith
a1d9503d8e
Fix use-after-free in error case in fserve, as noted by Jerome Alet
...
svn path=/icecast/trunk/icecast/; revision=11412
2006-05-18 22:06:32 +00:00
Michael Smith
25c55e1f86
Set error if we have an unrecognised codec, so that we properly drop the source
...
rather than just continuing forever on unrecognisable input.
svn path=/icecast/trunk/icecast/; revision=11184
2006-04-20 16:51:27 +00:00
Karl Heyes
d574647025
off by 1 error, although not triggered by icecast/ices
...
svn path=/icecast/trunk/log/; revision=11073
2006-03-31 02:14:12 +00:00
Karl Heyes
e00aafda3a
allow the last N lines to be cached and retrieved from each log, the default
...
is nothing cached (current behaviour).
svn path=/icecast/trunk/log/; revision=11063
2006-03-27 02:26:06 +00:00
Karl Heyes
0dc2655838
slave handler update. add timestamps to relays, allows slave thread to
...
process them better. This simplifies various checks and sits better with
relay startup and relay cleanup in certain error cases.
svn path=/icecast/trunk/icecast/; revision=11008
2006-03-15 03:02:08 +00:00
Karl Heyes
9e96120398
When modifying source_t contents we should take a write lock to prevent
...
races with other threads. so take a write lock on the client tree.
svn path=/icecast/trunk/icecast/; revision=11007
2006-03-15 02:42:18 +00:00
Karl Heyes
c81a42cb3b
close report #842 . It's more informative to report the read bytes
...
svn path=/icecast/trunk/icecast/; revision=11006
2006-03-15 02:34:39 +00:00
Karl Heyes
8ec568d5b5
fix possible bad pointer dereference bug when processing new clients
...
svn path=/icecast/trunk/icecast/; revision=11005
2006-03-15 02:30:26 +00:00
Karl Heyes
043bff364c
memory leak when handling ogg flac, and make sure that moving listeners
...
to theora streams triggers a search for a keyframe.
svn path=/icecast/trunk/icecast/; revision=11004
2006-03-15 02:24:57 +00:00
Michael Smith
091892c8c6
Forgot to commit this one yesterday: add a default case to prevent memory leaks
...
in any potential caller calling this with the wrong args.
svn path=/icecast/trunk/icecast/; revision=10989
2006-03-08 11:14:56 +00:00
Michael Smith
14e0cfcdac
Remove a bogus non-null check
...
svn path=/icecast/trunk/icecast/; revision=10979
2006-03-07 19:39:16 +00:00
Michael Smith
043aa0b009
Don't leak parsers when we fail to parse a shoutcast-compatible request.
...
svn path=/icecast/trunk/icecast/; revision=10978
2006-03-07 19:35:18 +00:00
Michael Smith
c4dfb3f2fd
Don't leak file pointers (and hence file descriptors) if we can't parse a range
...
request.
svn path=/icecast/trunk/icecast/; revision=10977
2006-03-07 19:28:41 +00:00
Michael Smith
9acddcdb8a
Oops, fix compilation
...
svn path=/icecast/trunk/icecast/; revision=10976
2006-03-07 19:27:54 +00:00
Michael Smith
36dc9b0c25
Free tree if we fail to allocate root node.
...
svn path=/icecast/trunk/avl/; revision=10975
2006-03-07 19:22:29 +00:00
Michael Smith
2848a70776
Fix a leak in a config parsing path when we see a directory server with no
...
host specified.
svn path=/icecast/trunk/icecast/; revision=10974
2006-03-07 19:21:04 +00:00
Michael Smith
3cf24e0af7
Add a missing check for LOG_MAXLOGS, fix another check to be >= rather than >
...
svn path=/icecast/trunk/log/; revision=10973
2006-03-07 19:17:06 +00:00
Michael Smith
82f1ebf52a
When falling back from a full source to another source, ensure the other source
...
actually exists.
svn path=/icecast/trunk/icecast/; revision=10972
2006-03-07 19:12:43 +00:00
Michael Smith
c892e2217a
Allow a NULL filename in log_set_filename, since it's allowed elsewhere.
...
Thanks Coverity!
svn path=/icecast/trunk/log/; revision=10971
2006-03-07 19:07:20 +00:00
oddsock
0320ef97f7
os.h doesn't exist anymore, use compat.h.
...
svn path=/icecast/trunk/net/; revision=10949
2006-02-24 04:37:22 +00:00
Michael Smith
739d544c34
Having both os.h and compat.h to do similar things is pointless; remove os.h
...
svn path=/icecast/trunk/icecast/; revision=10620
2005-12-17 12:41:34 +00:00
Michael Smith
4dea87dca7
As pointed out on irc, size_t is unsigned. Fix for the win32 case.
...
svn path=/icecast/trunk/icecast/; revision=10619
2005-12-17 12:36:08 +00:00
Michael Smith
5aa561c5b7
Modified version of patch from gtgbr@gmx.net to clean up headers and defines
...
for logging.
svn path=/icecast/trunk/icecast/; revision=10618
2005-12-17 12:34:37 +00:00
Michael Smith
daf771dbfe
Patch from gtgbr@gmx.net to make ICECAST_VERSION_STRING safe to contain any
...
content.
svn path=/icecast/trunk/icecast/; revision=10617
2005-12-17 12:27:29 +00:00
Michael Smith
ab1994ab44
More function decl/defn fixes
...
svn path=/icecast/trunk/log/; revision=10616
2005-12-17 12:23:54 +00:00
Michael Smith
37a6bb18d6
Patch from gtgbr@gmx.net to fix (void) function prototypes, with some minor
...
changes.
svn path=/icecast/trunk/icecast/; revision=10615
2005-12-17 12:23:09 +00:00
Michael Smith
4c3d56743d
Patch from gtgbr@gmx.net to fix function definition storage type.
...
svn path=/icecast/trunk/icecast/; revision=10613
2005-12-17 12:15:09 +00:00
Karl Heyes
5965554dbb
update for authentication header via libcurl. allows for http://user:pass@host ..
...
else the param specified user/pass. In the case of listener_add/remove use
the client provided user/pass if no others are specified.
svn path=/icecast/trunk/icecast/; revision=10498
2005-11-29 03:06:03 +00:00
Karl Heyes
d670683e1e
allow for the intro file to change over HUP
...
svn path=/icecast/trunk/icecast/; revision=10411
2005-11-20 13:53:29 +00:00
Karl Heyes
11c6e1039c
change status code for server/stream full cases ( #738 ), also some others places
...
where connections are terminated.
svn path=/icecast/trunk/icecast/; revision=10393
2005-11-17 00:54:28 +00:00
Karl Heyes
f7afa9761b
update queue handling for stats. This was slow when many stats were being
...
queued. These apply to both web interface requests and stats clients.
svn path=/icecast/trunk/icecast/; revision=10370
2005-11-15 00:36:34 +00:00
Karl Heyes
280006162e
fixup granulepos on EOS case when rebuilding vorbis streams. This was causing
...
a short audio glitch on playback, but was not typically noticed.
svn path=/icecast/trunk/icecast/; revision=10369
2005-11-15 00:29:24 +00:00
oddsock
6063820441
new external api to support log archiving
...
svn path=/icecast/trunk/log/; revision=10288
2005-10-24 14:52:35 +00:00
oddsock
3a85a143b5
2 new features to icecast logging:
...
- logsize : specify in KB the max size of any of icecast log files
- logarchive : causes icecast to rename logs with timestamps (for proper archiving)
svn path=/icecast/trunk/icecast/; revision=10287
2005-10-24 14:51:54 +00:00
Karl Heyes
758945ed2d
avoid adding a mount_t structure if there is no mount name defined, segv
...
occurs later on
svn path=/icecast/trunk/icecast/; revision=10151
2005-10-11 13:40:17 +00:00
Karl Heyes
43d8cfdd73
fix bug #717 . a race on source exit could cause memory corruption
...
svn path=/icecast/trunk/icecast/; revision=10135
2005-10-06 02:41:51 +00:00
Karl Heyes
24a24d8df0
add hack for nsvcap, apparently EOL is 3 chars
...
svn path=/icecast/trunk/icecast/; revision=10110
2005-10-01 14:08:36 +00:00
Karl Heyes
f869415cf7
Fix a bug where a shoutcast source client (nsvtools) does not wait for the
...
OK response. Icecast was dropping the connection preventing the stream
svn path=/icecast/trunk/icecast/; revision=10076
2005-09-26 16:34:51 +00:00
Karl Heyes
fce4c2263d
maintain the listener_peak stat across relay restarts
...
svn path=/icecast/trunk/icecast/; revision=10033
2005-09-19 02:11:16 +00:00
Karl Heyes
78287d2a6f
minor memory leak possible on source shutdown
...
svn path=/icecast/trunk/icecast/; revision=10021
2005-09-16 21:29:49 +00:00
oddsock
76689d72e8
Now you can start icecast as a windows service.
...
svn path=/icecast/trunk/icecast/; revision=10020
2005-09-16 18:29:10 +00:00
Karl Heyes
c66246b255
fix for race, client needs setup before adding to pending tree
...
svn path=/icecast/trunk/icecast/; revision=10019
2005-09-16 16:53:33 +00:00
Karl Heyes
c16926625f
reduce stack allocation to 512k, the defaults tend to be quite large
...
svn path=/icecast/trunk/thread/; revision=10018
2005-09-15 22:33:13 +00:00
Michael Smith
9a78c1b735
Fix deadlock when moving clients. Thanks to oddsock for producing a testcase and
...
backtrace, and karl for fixing my brain
svn path=/icecast/trunk/icecast/; revision=10017
2005-09-15 19:31:38 +00:00
Karl Heyes
477d44dd79
log username to access log (bug #706 ) if available.
...
svn path=/icecast/trunk/icecast/; revision=10012
2005-09-12 16:47:04 +00:00
Karl Heyes
7838940f0b
fix segv case on listmounts/moveclients when a fallback to file stream is running
...
svn path=/icecast/trunk/icecast/; revision=10009
2005-09-12 16:00:27 +00:00
Michael Smith
6d108c6aad
Patch from martin@matuska.org: don't treat all clients as duplicates.
...
svn path=/icecast/trunk/icecast/; revision=10008
2005-09-10 16:56:04 +00:00
Karl Heyes
64d2fc1faa
if the m3u link is placed in winamp/fb2k, then the host header misses the
...
port number, so I'll add a check that ignores the host header if it's
missing a port and generates the m3u host:port from the xml.
svn path=/icecast/trunk/icecast/; revision=10005
2005-09-08 13:43:33 +00:00
Karl Heyes
7cad0b70d6
do proper cleanup on odd cases of source client startup, also take mutex
...
lock for client_create at relay startup to prevent race
svn path=/icecast/trunk/icecast/; revision=10004
2005-09-08 13:32:17 +00:00
Karl Heyes
32691f498a
immediately release auth_t if authentication fails, that way we don't
...
trigger release_client like listener_remove event in the url auth.
Add lock in auth_t so that refcount changes are not a race possibility.
svn path=/icecast/trunk/icecast/; revision=9926
2005-09-01 16:11:07 +00:00
Karl Heyes
0903dd68ed
2 updates to mp3 metadata handling. allow a 0 metadata interval to disable
...
metadata being sent to new listeners (negative for whatever the source
sends), existing listeners retain their original interval setting. We now
limit how much mp3 is written after the metadata block in a single format
send call, this was only showing up on small interval values.
svn path=/icecast/trunk/icecast/; revision=9877
2005-08-31 01:28:04 +00:00
Karl Heyes
05e9562ae4
content was wrong due to limiter being 0
...
svn path=/icecast/trunk/icecast/; revision=9876
2005-08-31 01:13:25 +00:00
Michael Smith
0c6ba0c798
Fix bug reported by Jason@weatherserver.net - don't crash in htpasswd auth
...
if the auth file doesn't exist.
svn path=/icecast/trunk/icecast/; revision=9867
2005-08-30 20:29:20 +00:00
Karl Heyes
3116f62a9d
extra checks on YP updating, typically on changes over HUP
...
svn path=/icecast/trunk/icecast/; revision=9862
2005-08-30 00:30:30 +00:00
Karl Heyes
1d5c1ebdd6
fix double free bug with failed to start relays and add a guard on refbuf release
...
svn path=/icecast/trunk/icecast/; revision=9859
2005-08-29 01:16:02 +00:00
Karl Heyes
a4b03ad26c
minor memory leak, and compiler warning cleanup
...
svn path=/icecast/trunk/icecast/; revision=9857
2005-08-27 01:01:29 +00:00
Karl Heyes
76b8ec882f
hide fallback file from webroot stats, still accessible from admin. Missed
...
log debug line from apply function
svn path=/icecast/trunk/icecast/; revision=9848
2005-08-25 01:03:33 +00:00
Karl Heyes
d07723c997
fixes for client handling, these are all related to the handling of max clients.
...
I've taken out the client_create out of the connection_complete_source and put
it in slave, that way we can control the cleanup of the memory/socket better, the
change also meant fallback to file tests were slghtly different.
svn path=/icecast/trunk/icecast/; revision=9847
2005-08-25 00:07:17 +00:00
Karl Heyes
c519afa812
add per-mount listener time limit setting
...
svn path=/icecast/trunk/icecast/; revision=9834
2005-08-23 19:00:15 +00:00
Karl Heyes
82e12b4d96
Allow for new listeners to fallback if there are max listeners on the
...
current mountpoint
svn path=/icecast/trunk/icecast/; revision=9833
2005-08-23 18:40:20 +00:00
Michael Smith
663bd804dc
Some versions of gcc complain about the missing cast here; it's apparently
...
needed because some systems don't define NULL as a pointer (weird). Patch
from Moritz Grimm.
svn path=/icecast/trunk/icecast/; revision=9832
2005-08-23 10:48:09 +00:00
oddsock
37bdaee0cb
some windows build issues..
...
svn path=/icecast/trunk/icecast/; revision=9776
2005-08-20 00:03:21 +00:00
Karl Heyes
400d297a92
merge fix, oddcast (maybe other shoutcast source clients) don't wait for OK
...
response, so we may have surplus data already read, so keep it.
svn path=/icecast/trunk/icecast/; revision=9772
2005-08-18 20:37:35 +00:00
Karl Heyes
98d569bbf5
missed a diff from previous commit, consistent naming style
...
svn path=/icecast/trunk/icecast/; revision=9771
2005-08-18 20:26:30 +00:00
Karl Heyes
1aa657f1b4
changes applied from feedback. make option names and action settings more
...
consistent. Add changes to docs for listener auth via url
svn path=/icecast/trunk/icecast/; revision=9768
2005-08-17 16:38:46 +00:00
Karl Heyes
77ad26f39b
updates for #599 (dropping of stdin,out,err when using -b) and #630 (pidfile
...
created before changeowner/chroot)
svn path=/icecast/trunk/icecast/; revision=9759
2005-08-16 21:14:43 +00:00
Karl Heyes
092c73b4a5
log xml/xslt parsing failure messages via error log. This applies to both the
...
xsl files and the icecast xml file when re-read. At icecast startup, the logs
are not open so these parsing messages still go to stderr.
svn path=/icecast/trunk/icecast/; revision=9758
2005-08-16 16:56:24 +00:00
Karl Heyes
ab8e36bd19
increase the number of listening sockets allowed. A more flexible scheme can
...
be done later if required
svn path=/icecast/trunk/icecast/; revision=9757
2005-08-16 14:58:33 +00:00
Karl Heyes
9179ffe661
make admin replies go via fserve
...
svn path=/icecast/trunk/icecast/; revision=9741
2005-08-12 20:02:16 +00:00
Karl Heyes
dde143d4b1
make various responses going back to the client be done via the file serving thread
...
svn path=/icecast/trunk/icecast/; revision=9740
2005-08-12 15:27:32 +00:00
Karl Heyes
61267a308b
make sure that older xslt libs on non-win32 can be used as well
...
svn path=/icecast/trunk/icecast/; revision=9739
2005-08-12 03:27:09 +00:00
Karl Heyes
a528108e10
merge in client timelimit, only auth_url sets this currently. Add missing
...
prototypes for compile warning
svn path=/icecast/trunk/icecast/; revision=9736
2005-08-12 02:40:25 +00:00
oddsock
5d642efd86
compiler error on win32
...
svn path=/icecast/trunk/icecast/; revision=9734
2005-08-11 23:48:32 +00:00
Karl Heyes
d7f1285ba2
drop the thread pool of connection threads, they were using a blocking socket
...
on incoming connections. Now we get the accept thread to create a client_t
and mark it as a shoutcast client if need be. Then use a single connection
thread to poll the non-blocking sockets for the headers. When complete they
get handled as usual.
svn path=/icecast/trunk/icecast/; revision=9733
2005-08-11 23:29:58 +00:00
oddsock
30ce5c5ba9
memory leak fix..
...
svn path=/icecast/trunk/icecast/; revision=9732
2005-08-11 23:17:00 +00:00
Karl Heyes
03c74becbe
change the option names to be more reasonable
...
svn path=/icecast/trunk/icecast/; revision=9731
2005-08-11 23:11:50 +00:00
Karl Heyes
5732ec21ea
a few fixes needed after some testing on win32
...
svn path=/icecast/trunk/icecast/; revision=9730
2005-08-11 22:56:51 +00:00
oddsock
afae729cbb
xlst function so that win32 can use an older version of libxslt...
...
svn path=/icecast/trunk/icecast/; revision=9729
2005-08-11 20:31:13 +00:00
Karl Heyes
af9bc6bfb8
make sure we have the initial listeners stat
...
svn path=/icecast/trunk/icecast/; revision=9721
2005-08-09 02:55:38 +00:00
Karl Heyes
0f6d8ba821
merge fixes. NULL checks
...
svn path=/icecast/trunk/icecast/; revision=9720
2005-08-09 02:14:20 +00:00
Karl Heyes
042ba3b8e2
Merge mp3 packing. mp3 (and other pass-through streams) can bre received in
...
very small blocks and go out in those same small blocks increasing the protocol
overhead used by the provided. Generally occurs when using a low bitrate stream
and many listeners. With this patch we pack out a refbuf before queuing.
Add missing include for vorbis build that shows on some platforms
svn path=/icecast/trunk/icecast/; revision=9718
2005-08-08 19:21:54 +00:00
Karl Heyes
c7e04b2852
allow for webroot requests to be sent via an authenticator
...
svn path=/icecast/trunk/icecast/; revision=9717
2005-08-08 18:39:34 +00:00
Karl Heyes
eebb340a1a
merge URL listener auth
...
svn path=/icecast/trunk/icecast/; revision=9714
2005-08-07 23:29:12 +00:00
Karl Heyes
15b3a5f853
Initial auth merge. Add an auth thread (multiple threads can be done later)
...
which can be used to handle authentication mechanisms without taking locks
for long periods. Non-authenticated mountpoints bypass the auth thread.
The lookup/checking of the source_t is done after the authentication succeeds
so the fallback mechanism does not affect which authenticator is used. This
can be extended to allow us to authenticate in webroot as well. XML re-read
changes will take effect immediately for new listeners but existing listeners
will use the original auth_t (refcounted) when they exit.
htpasswd access has been seperated out from auth.c, and implements an AVL
tree for a faster username lookup. The htpasswd file timestamp is checked
just in case there are changes made externally
svn path=/icecast/trunk/icecast/; revision=9713
2005-08-07 23:01:04 +00:00
Karl Heyes
33cf86f527
merge extra checks. minor cleanup work
...
svn path=/icecast/trunk/icecast/; revision=9711
2005-08-07 14:50:59 +00:00
Karl Heyes
e2e35fe59d
force a large filesize limit on log files before cycling
...
svn path=/icecast/trunk/log/; revision=9706
2005-08-06 13:10:30 +00:00
oddsock
3e4967b8f9
implement.h, a pthreads include file, is no longer required for win32.
...
svn path=/icecast/trunk/thread/; revision=9635
2005-07-28 21:10:29 +00:00
Michael Smith
65cfce7b53
Fix for bug #688 as supplied by moinakg2002@yahoo.com; make icecast
...
compilable with Sun's compiler
svn path=/icecast/trunk/icecast/; revision=9626
2005-07-26 13:15:22 +00:00
Karl Heyes
6ccda03842
some xslt related fixes. A small memory leak, a socket not closing on odd
...
case, and truncate the buffer length so that junk chars are not sent back.
svn path=/icecast/trunk/icecast/; revision=9547
2005-07-04 20:11:15 +00:00
Karl Heyes
efd3692202
merge fix, the per client intro offset can be > 0, so we need to skip over
...
some of the burst data
svn path=/icecast/trunk/icecast/; revision=9514
2005-06-27 02:10:16 +00:00
Karl Heyes
2ecaecbf7f
missed from previous merge, some random chars at end of xml output
...
svn path=/icecast/trunk/icecast/; revision=9512
2005-06-25 12:27:10 +00:00
Karl Heyes
53650e969f
allow touch frequency setting to be changed on any YP response. Also pass
...
user agent to YP server
svn path=/icecast/trunk/icecast/; revision=9488
2005-06-19 13:50:39 +00:00
Karl Heyes
e9adc91bee
make admin and web root pages use file serving thread to send back responses
...
svn path=/icecast/trunk/icecast/; revision=9464
2005-06-18 10:54:53 +00:00
Karl Heyes
4f4e7be98f
push HTTP header writing for file download into file serving thread to prevent
...
stalls in connection thread. perform most file checking in fserve but allow
for m3u file override and using the Host header if available.
svn path=/icecast/trunk/icecast/; revision=9462
2005-06-17 22:55:59 +00:00
Karl Heyes
7446328d1d
store the original full uri if there are query parameters. small cleanup to
...
prototype definitions
svn path=/icecast/trunk/httpp/; revision=9453
2005-06-15 02:32:26 +00:00
Karl Heyes
88bfe6ba6a
small cleanups. redundant mutex removed, updates to log messages
...
svn path=/icecast/trunk/icecast/; revision=9443
2005-06-12 18:43:11 +00:00
Karl Heyes
c59a276ab5
update file serving setup and processing. Do http header writing in fserve
...
thread by using generic write routine. small leak plugged on failure case.
extend mime type handling slightly for rare case
svn path=/icecast/trunk/icecast/; revision=9440
2005-06-11 17:21:00 +00:00