1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-06-23 06:25:24 +00:00
Commit Graph

129 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
29c83ae4eb update a few stats
svn path=/icecast/trunk/icecast/; revision=9437
2005-06-11 01:24:58 +00:00
Karl Heyes
be78a3ae11 merge in fallback to file, override also works
svn path=/icecast/trunk/icecast/; revision=9434
2005-06-10 15:42:06 +00:00
Karl Heyes
05a14555d9 merge per-mount on-[dis]connect script handling
svn path=/icecast/trunk/icecast/; revision=9424
2005-06-10 00:37:09 +00:00
Karl Heyes
84a0892cff add a few more informational stats
svn path=/icecast/trunk/icecast/; revision=9423
2005-06-09 20:54:08 +00:00
Karl Heyes
39c5021b7c don't be too quick when dealing with files. allow the limited per-client
loop but don't trigger a small poll timeout

svn path=/icecast/trunk/icecast/; revision=9418
2005-06-09 13:29:11 +00:00
Karl Heyes
ad1e6c41b0 merge in the on-demand relay implementation.
svn path=/icecast/trunk/icecast/; revision=9406
2005-06-09 01:51:47 +00:00
Karl Heyes
743dbbaeca Do normal http header writing in source thread instead of the connection
thread, this will allow on-demand relays to fail and still handle the initial
listener correctly (fallback or 404 response).

svn path=/icecast/trunk/icecast/; revision=9399
2005-06-08 01:36:51 +00:00
Karl Heyes
2896db1f3c merge intro file implementation
svn path=/icecast/trunk/icecast/; revision=9345
2005-06-03 15:35:52 +00:00
Karl Heyes
72ad63f763 missed a merge for stats update for when the relay ends. The rest is minor
stuff, type check cleanup and code reduction in YP

svn path=/icecast/trunk/icecast/; revision=9331
2005-05-31 02:48:40 +00:00
Karl Heyes
79adab0133 allow for more updating over HUP. Made the YP engine only read the stats instead
of updating them, so source header parsing is done in the apply mount. Per-mount
stream settings also allow for overriding the incoming settings.

svn path=/icecast/trunk/icecast/; revision=9325
2005-05-30 14:50:57 +00:00
Karl Heyes
d57a19acac various small things. type cleanups, loop over the burst point to make sure
it is at the right point. kick off the YP 'add' 5 seconds after source startup
so that any stats are processed.

svn path=/icecast/trunk/icecast/; revision=9314
2005-05-26 03:04:48 +00:00
Karl Heyes
5b9e7f1660 use minimal stats for inactive mountpoints that have an active fallback.
svn path=/icecast/trunk/icecast/; revision=9286
2005-05-16 00:16:12 +00:00
Karl Heyes
7fadd89273 use a client function to read an incoming stream, simplifies handling within
the format specific files. Also add total read/sent stats per mountpoint.
Updates the stats every 5 secs currently

svn path=/icecast/trunk/icecast/; revision=9241
2005-05-08 13:51:05 +00:00
Karl Heyes
e2d6bdb86a add function to do mount list search (could be extended later), call it from
various places including the shoutcast source client auth which previously
only used the global source password.

svn path=/icecast/trunk/icecast/; revision=9240
2005-05-08 11:54:46 +00:00
Karl Heyes
6d48d6c4f9 Allow for specifiying a per-mount metadata interval for shoutcast style streams
svn path=/icecast/trunk/icecast/; revision=9233
2005-05-07 20:18:13 +00:00
Karl Heyes
2a2938b68b merge from branch. push clients count handling to the client_create/_destroy
functions. call client_create in the general handler and pass client_t to the
specific handler including the stats request handler, which now logs in the
access log.

svn path=/icecast/trunk/icecast/; revision=9220
2005-05-06 15:57:15 +00:00
Karl Heyes
8e99b390f2 safety check, avoid the case of a cyclic cascading fallback
svn path=/icecast/trunk/icecast/; revision=9196
2005-05-01 02:30:06 +00:00
Karl Heyes
19cb11cc31 merge in a few fixes and cleanups I've accumulated in my branch.
svn path=/icecast/trunk/icecast/; revision=9152
2005-04-18 14:32:26 +00:00
Michael Smith
d43484d49a Fix various places where "clients" stats value was decremented without having
previously been incremented. 

svn path=/icecast/trunk/icecast/; revision=9074
2005-03-14 23:07:34 +00:00
Karl Heyes
2bd23d9050 merge multi ogg codec handling. Handle theora and/or vorbis. Place new
clients before keyframe. For vorbis-only streams, perform rebuild to
flush pages more frequently and to provide url updating mechanism for
titles 

svn path=/icecast/trunk/icecast/; revision=8341
2004-12-07 21:06:26 +00:00
Karl Heyes
a521d15d74 merge per-mount hidden setting. prevent specific mountpoints being listed
on status.xsl and streamlist

svn path=/icecast/trunk/icecast/; revision=8245
2004-11-22 18:21:48 +00:00
Karl Heyes
2b4ee737db add per-mount no-yp tag handling
svn path=/icecast/trunk/icecast/; revision=8241
2004-11-21 15:51:49 +00:00
oddsock
731f24d050 handle supported content-types in a more generic way now. This will allow things like AAC, AACPlus, NSV, and others to be streamed through icecast. We have a special case for vorbis streams, and everything else falls into the generic case.
svn path=/icecast/trunk/icecast/; revision=8226
2004-11-18 23:49:59 +00:00
Karl Heyes
1e6232c531 add <shoutcast-mount>. drop the hardcoded mountpoint hacks for NSV
svn path=/icecast/trunk/icecast/; revision=8213
2004-11-17 16:02:04 +00:00
oddsock
80078cce1d * support for the Shoutcast DSP (yay!).
You can now use the Shoutcast DSP as a source client.  The connection 
    protocol is a bit odd, and we had to handle it separately, and thus 
    we've added a new config option (<shoutcast-compat>) that is set at 
    the listener port level.
* support for NSV (and the nsvscsrc source client).
    After adding support for the connection protocol of the shoutcast DSP, 
    adding NSV was just a simple of a few special handling cases.
* removed all traces of the earlier attempt at the shoutcast DSP connection 
  protocol
* Due to the growing complexity of the config files, I've also created a 
  few alternate config files, namely one for a "shoutcast compat" setup
  as well as a "minimal" one for quick basic configurations.

svn path=/icecast/trunk/icecast/; revision=8191
2004-11-11 15:47:33 +00:00
oddsock
6127fea475 * fix bug of not using url decoding value when processing audio_info string
* we now process server name and description if we are not a public stream
* Added quality to status.xsl

svn path=/icecast/trunk/icecast/; revision=8131
2004-10-29 15:31:56 +00:00
Karl Heyes
3026e1d089 small cleanups. fix buffer sizing, const and unused struct member
svn path=/icecast/trunk/icecast/; revision=8104
2004-10-26 14:21:36 +00:00
Karl Heyes
82c116a72d the check for the public stream flag wasn't working correctly in all cases
svn path=/icecast/trunk/icecast/; revision=8100
2004-10-25 20:46:12 +00:00
Karl Heyes
8aaf433aa4 add check for header when relaying from v2.0
svn path=/icecast/trunk/icecast/; revision=8098
2004-10-25 18:51:45 +00:00
Karl Heyes
7b9b8e70a3 The _inc/_dec routines can race causing incorrect values as they don't account
for unprocessed stat events.  Here I push the actual calculations to the stats
thread. The API is maintained however all stats for a specific source can be
dropped with one call now.

svn path=/icecast/trunk/icecast/; revision=8090
2004-10-25 14:03:42 +00:00
Michael Smith
b6e001ce8d When creating a source (in source_reserve), issue a warning if the mountpoint
does not start with a /, since clients will then be unable to connect to it

svn path=/icecast/trunk/icecast/; revision=7899
2004-10-01 00:42:19 +00:00
Karl Heyes
69af6210c0 small memory leak, only happened when a source exited
svn path=/icecast/trunk/icecast/; revision=7596
2004-08-20 22:55:27 +00:00
Karl Heyes
9c44a7d184 merged singleq branch 7177:7591
svn path=/icecast/trunk/icecast/; revision=7592
2004-08-20 15:13:59 +00:00
Karl Heyes
94d24f406e cleanup patch, push per client write error trap lower down
svn path=/icecast/trunk/icecast/; revision=7165
2004-07-16 15:47:12 +00:00
giles
d6d634ac02 Recommit of changes lost in the server migration
Original commit (r6810) 2004-06-04 03:15:36 -0400 (Fri, 04 Jun 2004) by msmith.

Fix #526. Fallbacks weren't being found when the primary was disconnected (for
newly-connecting clients).

svn path=/icecast/trunk/icecast/; revision=6810
2004-06-06 03:08:19 +00:00
Karl Heyes
55ba59f3f7 Update of the YP code. This should resolve several YP issues that
have been reported, the main one being icecast instability when
there is a YP server outage.


svn path=/icecast/trunk/icecast/; revision=6646
2004-05-10 16:17:56 +00:00
oddsock
d642846c80 added web based interface to htpasswd client authentication
svn path=/icecast/trunk/icecast/; revision=6610
2004-04-30 14:36:07 +00:00
oddsock
32718b5b4e new feature in icecast : burst-on-connect - allows an initial burst of data to connecting listeners, thus reducing the startup time of a stream.
svn path=/icecast/trunk/icecast/; revision=6606
2004-04-29 15:23:13 +00:00
oddsock
89f9f38d78 added HAVE_LOCALTIME_R to project file
added #define for snprintf (win32 requires _snprintf)

svn path=/icecast/trunk/icecast/; revision=6594
2004-04-25 23:28:36 +00:00
Michael Smith
5323b27c95 Couple of minor contributed patches.
- Solaris/autoconf nanosleep checking
- use time_t as appropriate for yp

svn path=/trunk/icecast/; revision=5921
2004-03-09 02:36:01 +00:00