1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-07-14 02:44:14 -04:00
Commit Graph

1386 Commits

Author SHA1 Message Date
Philipp Schafft
fc63b67b87 fixing some compiler warnings
svn path=/icecast/trunk/icecast/; revision=19280
2014-11-07 23:10:43 +00:00
Philipp Schafft
78ca9bd2ba updated some copyright headers
svn path=/icecast/trunk/icecast/; revision=19278
2014-11-07 22:06:06 +00:00
Philipp Schafft
29d9778c09 fix for %z on win*. hope it doesn't breaky anything else.
svn path=/icecast/trunk/icecast/; revision=19277
2014-11-07 20:56:04 +00:00
Philipp Schafft
70f8d14d1c added warnings on empty and default values of <fileserve>, <hostname>, <location>, <admin> and <server-id>
svn path=/icecast/trunk/icecast/; revision=19276
2014-11-07 19:14:28 +00:00
Philipp Schafft
0b7e65c3c9 send errorlog (loglevel WARN) to stderr prior to opening the real logfiles. closes #1886
svn path=/icecast/trunk/icecast/; revision=19271
2014-11-07 11:18:54 +00:00
Philipp Schafft
1d56769648 added support for type="" and status="" in <header> (subelement of <http-headers>).
svn path=/icecast/trunk/icecast/; revision=19270
2014-11-07 10:12:24 +00:00
Philipp Schafft
9597e2eadd Added support for <http-headers> within <mount>. Also support merging of headers (normal mount + default mount). See #1885
svn path=/icecast/trunk/icecast/; revision=19269
2014-11-07 02:55:57 +00:00
Philipp Schafft
aa869033e2 handle empty strings in config file better. Now empty strings are handled in: accesslog, errorlog, logdir, webroot, adminroot and hopefully all kinds of port. Feal free to reopen ticket if there are more that needs to be fixed. closes #1963
svn path=/icecast/trunk/icecast/; revision=19268
2014-11-07 01:40:28 +00:00
Philipp Schafft
df9d738b6e initial patch to allow adding user defined headers, closes #1885
svn path=/icecast/trunk/icecast/; revision=19267
2014-11-07 00:56:02 +00:00
Philipp Schafft
97454060eb coding style and typo correcion
svn path=/icecast/trunk/icecast/; revision=19266
2014-11-06 23:55:58 +00:00
Thomas B. "dm8tbr" Ruecker
859c761cb6 Be more verbose in case of fileserve off.
svn path=/icecast/trunk/icecast/; revision=19265
2014-11-06 12:02:00 +00:00
Thomas B. "dm8tbr" Ruecker
0eff9a91e9 applied patch to update the default ciphers to be more secure (close #2072)
This was taken from: https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/#fnref2 (scroll up 2 lines)

I've tested this successfully against https://www.ssllabs.com/ssltest/ in combination with the patch for #2071. The only OS/Browser combination failing is: IE 6 / XP

svn path=/icecast/trunk/icecast/; revision=19264
2014-11-05 10:09:07 +00:00
Philipp Schafft
a3b50beabd applied patch to disable SSLv3 and SSL compression explicitly (close #2071)
svn path=/icecast/trunk/icecast/; revision=19263
2014-11-03 19:34:10 +00:00
Philipp Schafft
e6ce60e630 rename ICE_LISTEN_QUEUE, ICE_RUNNING and ICE_HALTING so they have a prefix of ICECAST_
svn path=/icecast/trunk/icecast/; revision=19258
2014-10-31 09:00:45 +00:00
Philipp Schafft
2b7cb1c641 LOG_{ERROR|WARN|INFO|DEBUG}() -> ICECAST_LOG_{ERROR|WARN|INFO|DEBUG}(); this is to avoid collision with LOG_INFO that is defined as part of syslog.
svn path=/icecast/trunk/icecast/; revision=19257
2014-10-31 08:46:58 +00:00
Philipp Schafft
cf419cc1df make <auth> in <mount type="default"> work if no <mount-name> is given.
svn path=/icecast/trunk/icecast/; revision=19251
2014-10-26 14:03:57 +00:00
ePirat
461a537561 More detailed logging
Add source IP adress to startup and source exit logging, see #2016
Add mountpoint to some log lines, see #1388


svn path=/icecast/trunk/icecast/; revision=19250
2014-10-23 20:41:38 +00:00
Philipp Schafft
634ab4ffc2 fix warnings, mostly related to win*-builds
svn path=/icecast/trunk/icecast/; revision=19246
2014-10-18 16:25:29 +00:00
Philipp Schafft
7ae4664780 Replace the old logging macros with variadic argument macros. (patch by ePirat) (close #2058)
svn path=/icecast/trunk/icecast/; revision=19229
2014-10-09 10:39:13 +00:00
Thomas B. "dm8tbr" Ruecker
53e6ee7abb SECURITY FIX - Override supplementary groups
In case of <changeowner> only UID and GID were changed, 
supplementary groups were left in place.
This is a potential security issue only if <changeowner> is used.
New behaviour is to set UID, GID and set supplementary groups 
based on the UID
Even in case of icecast remaining in supplementary group 0 
this "only" gives it things like access to files that are owned 
by group 0 and according to their umask. This is obviously bad,
but not as bad as UID 0 with all its other special rights.
It's a security issue and we fix immediately and recommend users to update.

PS: Cherry picking this should be fine by distros for fixing older releases.

svn path=/icecast/trunk/icecast/; revision=19137
2014-05-06 04:53:24 +00:00
Thomas B. "dm8tbr" Ruecker
db99c66aa0 Fix email address, my work email was fixed since.
svn path=/icecast/trunk/icecast/; revision=19123
2014-05-04 08:07:25 +00:00
Thomas B. "dm8tbr" Ruecker
9b823cb879 Adding stream_start_iso8601, server_start_iso8601
ISO8601 compliante timestamps for statistics. Should make usage in e.g. JSON
much easier.
Added as new variables to avoid breaking backwards compatibility.

svn path=/icecast/trunk/icecast/; revision=19122
2014-05-04 07:14:54 +00:00
Thomas B. "dm8tbr" Ruecker
2cf9930e91 Reverting r18945 for now as using -b breaks things.
Reopening #1886

svn path=/icecast/trunk/icecast/; revision=19100
2014-03-01 17:37:38 +00:00
Thomas B. "dm8tbr" Ruecker
110a84146d Send charset in headers for everything, excluding file-serv and streams.
svn path=/icecast/trunk/icecast/; revision=19096
2014-02-23 21:29:35 +00:00
Philipp Schafft
518ec953f7 fixed(?) a memory leak: lost headers of stream because of wrong ref counter in associated refbuf objects. I HATE refbuf.
svn path=/icecast/trunk/icecast/; revision=19054
2014-01-12 21:09:04 +00:00
Philipp Schafft
c9b6d627ab send 100-continue-header if client requests it
svn path=/icecast/trunk/icecast/; revision=19053
2014-01-12 12:29:27 +00:00
Philipp Schafft
c88f7d7de2 avoid memory leak in _parse_mount() when "type"-attribuet is set
svn path=/icecast/trunk/icecast/; revision=19052
2014-01-12 12:09:59 +00:00
Philipp Schafft
3f0d8a097e corrected Date:-header format to conform the standard (see RFC1123). Thanks to cato for reporting.
svn path=/icecast/trunk/icecast/; revision=19012
2013-11-06 01:01:31 +00:00
Philipp Schafft
917ace89da corrected logic checking argument. Thanks to David Binderman for reporting
svn path=/icecast/trunk/log/; revision=18961
2013-07-04 12:31:17 +00:00
Thomas B. "dm8tbr" Ruecker
5a26946236 This patch closes ticket #1886.
I've rethought the approach and found a much cleaner way. 
We now split handling of command line arguments into two parts.
Only the critical part of getting the config file is done first (and -v as it prevents startup).
The rest (currently only -b) is deferred.

This achieves the important bit why #1886 was created. 
It allows us to log error messages to stderr even if the -b argument is passed.
This is mainly for the case where the logfile or TCP port can't be opened.

svn path=/icecast/trunk/icecast/; revision=18945
2013-05-15 16:45:55 +00:00
Thomas B. "dm8tbr" Ruecker
115d64d8b4 Edited warning for clarity.
svn path=/icecast/trunk/icecast/; revision=18910
2013-04-05 20:13:18 +00:00
Philipp Schafft
b4887fc581 added a warning in case mount of type default is defined but a mountname is set
svn path=/icecast/trunk/icecast/; revision=18909
2013-04-05 19:49:13 +00:00
Thomas B. "dm8tbr" Ruecker
ff4649bc49 Add warning when using generic handler for stream sent to Icecast.
All bets are off, we're trying our best using legacy handling code.

svn path=/icecast/trunk/icecast/; revision=18907
2013-04-05 16:43:16 +00:00
Philipp Schafft
f19107adc7 avoid fnmatch() on _WIN32 and fall back to strcmp(). Seems that MinGW does half-implement fnmatch()...
svn path=/icecast/trunk/icecast/; revision=18905
2013-04-03 02:04:38 +00:00
Philipp Schafft
47dd39a67c do fuzzy(fnmatch) matching for mountpoint names of non-normal mounts, see #1914
svn path=/icecast/trunk/icecast/; revision=18904
2013-04-03 00:46:55 +00:00
Philipp Schafft
53e8553035 mount points defined in config should use data from default mounts as well, see #1914
svn path=/icecast/trunk/icecast/; revision=18903
2013-04-03 00:33:10 +00:00
Philipp Schafft
d54c61bf13 Added support for a default mount. See #1914.
The default mount is a block in the config file that contains settings for
all mount points that do not have a block in configfile themself.
This is implemented by a <mount type="default">-block.
In this case the <mount>-block MUST NOT contain a <mount-name>-subblock.

svn path=/icecast/trunk/icecast/; revision=18902
2013-04-02 18:46:44 +00:00
Philipp Schafft
f9cfeb51ab Throw away the reqbuf stuff as it was not well designed. Removing it and restoring usage of %H *fixes* #1942 not just workaround it with opening security holes. close #1942
svn path=/icecast/trunk/icecast/; revision=18901
2013-04-02 12:19:33 +00:00
Philipp Schafft
3d9f6643bc allow space in format string for %H to allow spaces in output
svn path=/icecast/trunk/log/; revision=18900
2013-04-02 12:17:43 +00:00
Philipp Schafft
c502c9cc27 make use of const keyword in _fatal_error()
svn path=/icecast/trunk/icecast/; revision=18899
2013-04-02 11:51:47 +00:00
Philipp Schafft
e0b6d1396d allow --version as alias to -v (printing version number)
svn path=/icecast/trunk/icecast/; revision=18898
2013-04-02 11:48:40 +00:00
Thomas B. "dm8tbr" Ruecker
3c359b62dd Highly experimental HTTP PUT support. ref #1812
We are handling it the same as we would handle a SOURCE request.
Due to legacy code, sender MUST send proper content-type header,
if content type is not audio/mpeg!
Can be tested using real-time encoded output and piping it into
| curl -u username:password -H "Content-type: application/ogg" -T - http://localhost:8000/mountname.ogg
Note that this example has ZERO timing, so a simple 'cat *.ogg' will fail.
Whatever feeds the pipe must do it at proper timing for real-time playback!

svn path=/icecast/trunk/icecast/; revision=18888
2013-03-29 15:07:33 +00:00
Thomas B. "dm8tbr" Ruecker
26640bb58d Backing out part of r18755 touching this file.
fixes #1942

svn path=/icecast/trunk/icecast/; revision=18887
2013-03-29 14:41:24 +00:00
Philipp Schafft
aec4326149 corrected mime type of plain text mount point list, thanks to cato
svn path=/icecast/trunk/icecast/; revision=18807
2013-02-24 14:25:37 +00:00
Philipp Schafft
6e7c65bc10 send Expires:-headers on all cache=0 requests, close #1870
svn path=/icecast/trunk/icecast/; revision=18805
2013-02-24 02:04:43 +00:00
Philipp Schafft
d0bf2c64ed handle yp headers case insensetive, close #1873
svn path=/icecast/trunk/icecast/; revision=18804
2013-02-24 00:53:09 +00:00
Philipp Schafft
1f833eb244 Allow full URLs to be returned by the master server. close #1878
svn path=/icecast/trunk/icecast/; revision=18799
2013-02-23 20:55:58 +00:00
Philipp Schafft
40bc1e7659 Updated listener_remove handler:
* added ip= and agent=,
 * Some cleanup && made code more uniform,
 * avoid int for size_t vars.
actions: close #1422

svn path=/icecast/trunk/icecast/; revision=18798
2013-02-23 17:51:16 +00:00
Philipp Schafft
2c3108387b format fix
svn path=/icecast/trunk/icecast/; revision=18797
2013-02-23 17:05:54 +00:00
Philipp Schafft
a5163365a0 do not call xmlCleanupParser() too often, close #1931
svn path=/icecast/trunk/icecast/; revision=18796
2013-02-23 16:38:23 +00:00
Philipp Schafft
af068a72a6 Replaced usage of sprintf() with snprintf(). Also exported size of key printer's buffer in avl/.
svn path=/icecast/trunk/avl/; revision=18771
2013-01-16 12:02:14 +00:00
Philipp Schafft
3d504e9e6c Escape log entries in access log (close: #1916)
svn path=/icecast/trunk/log/; revision=18756
2013-01-02 14:44:43 +00:00
Philipp Schafft
bb07af1eb7 Escape log entries in access log (close: #1916)
svn path=/icecast/trunk/icecast/; revision=18755
2013-01-02 14:44:08 +00:00
Philipp Schafft
67d91cc3d2 corrected Content-Length: header in admin (raw) requests. Thanks to paluh for reporting.
svn path=/icecast/trunk/icecast/; revision=18698
2012-11-13 14:40:48 +00:00
Philipp Schafft
5b8e359f10 cleanup unused var schedule_config_reread.
svn path=/icecast/trunk/icecast/; revision=18693
2012-11-13 11:25:46 +00:00
Philipp Schafft
d0aa6c8769 correction for win32 build to avoid segfault if build with mingw (who wrote that code?)
svn path=/icecast/trunk/icecast/; revision=18688
2012-11-12 21:01:57 +00:00
Philipp Schafft
4e7434c71c corrected coding style
svn path=/icecast/trunk/icecast/; revision=18666
2012-10-14 23:50:15 +00:00
Philipp Schafft
2b40660a20 removed useless blank line
svn path=/icecast/trunk/icecast/; revision=18665
2012-10-14 21:36:10 +00:00
Philipp Schafft
98935fcc6e removed \r at end of lines
svn path=/icecast/trunk/icecast/; revision=18655
2012-10-12 14:41:12 +00:00
Philipp Schafft
6cbd28a057 updated copyright notices.
svn path=/icecast/trunk/icecast/; revision=18651
2012-10-11 22:54:53 +00:00
Philipp Schafft
27ba19f014 avoid compiler warnings; send /message/ in case of 403.
svn path=/icecast/trunk/icecast/; revision=18650
2012-10-11 22:49:57 +00:00
Philipp Schafft
61c9def238 cleanup of <source-password> parser code
svn path=/icecast/trunk/icecast/; revision=18649
2012-10-11 22:28:40 +00:00
Philipp Schafft
fdcef55ce1 Added options "headers" and "header_prefix" to URL based listener auth.
Someone should update the docs/ textes to good english.

svn path=/icecast/trunk/icecast/; revision=18648
2012-10-11 18:06:30 +00:00
Philipp Schafft
a424a4e1fe Fix win32 patches (r18642) so it builds corectly on non-win32 again.
svn path=/icecast/trunk/icecast/; revision=18646
2012-10-11 00:26:38 +00:00
Philipp Schafft
91b49c583b use correct prototype.
svn path=/icecast/trunk/icecast/; revision=18645
2012-10-10 23:34:54 +00:00
Philipp Schafft
9872182a09 Improved handling of HTTP client errors:
* Make the internal API more uniform,
 * Improved error pages slightly (See: #1889).

svn path=/icecast/trunk/icecast/; revision=18644
2012-10-10 23:15:05 +00:00
Philipp Schafft
469844374a Make some more vars local (static).
svn path=/icecast/trunk/icecast/; revision=18643
2012-10-10 22:48:15 +00:00
Philipp Schafft
4927a1109d fixes for win32 (ported 2.3.99.0 patches). Thanks to LRN (from Mailing list).
svn path=/icecast/trunk/icecast/; revision=18642
2012-10-10 22:41:30 +00:00
Philipp Schafft
8e0777a4bd allow <stream-name> to override the icy-name: HTTP header, close #1359
svn path=/icecast/trunk/icecast/; revision=18543
2012-08-18 20:34:11 +00:00
Philipp Schafft
7eb5e1b6e4 Corrected check for the value of priority to be within valid range.
svn path=/icecast/trunk/log/; revision=18485
2012-07-31 23:09:42 +00:00
Philipp Schafft
2abd67d497 remove unused variable "ice_config_t *config" from format_prepare_headers()
svn path=/icecast/trunk/icecast/; revision=18465
2012-07-18 01:40:55 +00:00
Philipp Schafft
abf6c134d0 Send proper HTTP headers in responses to clients.
This is currently not implemented for SOURCE and STATS clients as
I suspect to break them. This needs some more research.
close #1639, see #1870 and #1885.

svn path=/icecast/trunk/icecast/; revision=18464
2012-07-17 23:55:09 +00:00
Thomas B. "dm8tbr" Ruecker
9c2db2107f Adding limits.h to fix build problems on e.g. newer glibc.
svn path=/icecast/trunk/icecast/; revision=18459
2012-07-17 21:24:45 +00:00
Philipp Schafft
55c9b45f0e added new lion at end of file so it does not mess up my console.
svn path=/icecast/trunk/icecast/; revision=18456
2012-07-17 14:50:44 +00:00
Philipp Schafft
9967447544 Allow (standard strftime(3)) %x codes in mount's <dump-file> to embedd timestamps in filenames. This currently only works on non windows. closes #1823
svn path=/icecast/trunk/icecast/; revision=18455
2012-07-17 14:42:16 +00:00
Philipp Schafft
2cb0e3180d race condition patch as submitted by lds and remi, slightly motified by me. closes #1810
svn path=/icecast/trunk/icecast/; revision=18454
2012-07-17 14:03:37 +00:00
Philipp Schafft
eea84fca6c commited support for HTTP PUT, See #1812
svn path=/icecast/trunk/httpp/; revision=18452
2012-07-16 16:05:21 +00:00
giles
818c1aff71 Add WebM support.
This is David Richard's webm support patch from the icecast-webm branch.

svn path=/icecast/trunk/icecast/; revision=18402
2012-06-13 21:24:23 +00:00
giles
1295a56c4d Add support for Opus audio in the Ogg container.
Patch by David Richards from the icecast-webm branch.

svn path=/icecast/trunk/icecast/; revision=18401
2012-06-13 21:11:07 +00:00
Philipp Schafft
1b071ba395 support field width with (most common) %Ns and %NH syntax.
svn path=/icecast/trunk/log/; revision=18363
2012-06-07 18:27:58 +00:00
Philipp Schafft
5dede89f82 honor field width in %s and %H
svn path=/icecast/trunk/log/; revision=18362
2012-06-07 18:13:28 +00:00
Philipp Schafft
95105687f1 consider backticks as well as backslashes invalid chars
svn path=/icecast/trunk/log/; revision=18361
2012-06-07 18:09:48 +00:00
giles
636a2959f3 Merge fixes from trunk.
svn path=/icecast/branches/icecast-webm/; revision=18358
2012-06-07 16:51:03 +00:00
Thomas B. "dm8tbr" Ruecker
ddbce35678 This is part of the patch-set addressing CVE-2011-4612.
svn path=/icecast/trunk/log/; revision=18356
2012-06-07 15:57:59 +00:00
Thomas B. "dm8tbr" Ruecker
38cad36049 This is part of the patch-set addressing CVE-2011-4612.
svn path=/icecast/trunk/icecast/; revision=18355
2012-06-07 15:57:11 +00:00
giles
e6cd0cff1f Clarify that only these specific files are GPLv2 or v3.
Icecast itself remains GPLv2 only.

svn path=/icecast/branches/icecast-webm/; revision=18307
2012-05-24 18:32:06 +00:00
giles
1c0b051b80 Update copyright headers for the new code.
Also update the license statement to GPL2 or later.

svn path=/icecast/branches/icecast-webm/; revision=18303
2012-05-24 16:10:20 +00:00
giles
0fce619138 Add opus support.
This is David Richards' support patch for Ogg encapsulated
Opus streams.

From 35927ca52f

svn path=/icecast/branches/icecast-webm/; revision=18302
2012-05-24 16:04:27 +00:00
giles
835408b7eb Add David Richard's webm support patch.
This is a self-contained ebml parser. It just looks
for cluster boundaries and breaks the stream there.

svn path=/icecast/branches/icecast-webm/; revision=18297
2012-05-18 17:33:17 +00:00
Philipp Schafft
446053dd9a corrected some small formating errors and typos
svn path=/icecast/trunk/icecast/; revision=18131
2011-11-26 02:39:30 +00:00
Philipp Schafft
17db41eba1 Added VCLT playlist support.
svn path=/icecast/trunk/icecast/; revision=18130
2011-11-26 02:37:39 +00:00
Philipp Schafft
e157de2321 Updated <alias> to use destination="" not dest="".
The old dest="" attribute is still supported.

svn path=/icecast/trunk/icecast/; revision=18128
2011-11-25 22:22:48 +00:00
Thomas B. "dm8tbr" Ruecker
f57110d7e5 Applied justdave's patches, fixing #1717 and #1718.
HTTPS now with better security and support for chained
certificates

svn path=/icecast/trunk/icecast/; revision=18127
2011-11-25 22:12:11 +00:00
Philipp Schafft
d66c53987c added a missing '*' to the copyright header
svn path=/icecast/trunk/icecast/; revision=18126
2011-11-25 22:00:36 +00:00
Philipp Schafft
530b78d7a1 Allow the source password to be undefined.
This is to avoid falling back to a default password which may open security holes.

svn path=/icecast/trunk/icecast/; revision=18125
2011-11-25 21:24:28 +00:00
Thomas B. "dm8tbr" Ruecker
99788838ac First part of security fix for #1846
svn path=/icecast/trunk/icecast/; revision=18124
2011-11-25 19:59:03 +00:00
Karl Heyes
3c4816555e win32 updates. cleanup of the start and finish of the gui and service
svn path=/icecast/trunk/icecast/; revision=16440
2009-08-05 22:32:47 +00:00
Karl Heyes
1f92e2ab1c setting an interval of 0 in mount should disable shoutcast metadata inserts.
svn path=/icecast/trunk/icecast/; revision=16439
2009-08-05 22:24:04 +00:00
Karl Heyes
fa7b8bb814 send host header on relay connect
svn path=/icecast/trunk/icecast/; revision=16257
2009-07-11 01:23:16 +00:00
Karl Heyes
74e11b7194 fix case of global listeners count becoming out of sync. It is possible that
connecting listeners will disconnect before any processing is done on them.

svn path=/icecast/trunk/icecast/; revision=16254
2009-07-10 15:08:30 +00:00
Karl Heyes
44c05662c7 minor cleanups.
svn path=/icecast/trunk/httpp/; revision=16213
2009-07-07 16:37:31 +00:00
Karl Heyes
b9b94478c7 bug+fix reported on icecast-dev (Petr Pisar, 06/07/2009). poll implementation
of sock_connected had incorrect return in failure case.

svn path=/icecast/trunk/net/; revision=16209
2009-07-06 14:28:16 +00:00
Karl Heyes
5597e2b874 prevent a debug message from triggering
svn path=/icecast/trunk/icecast/; revision=15784
2009-03-17 02:59:50 +00:00
Karl Heyes
ed7e707f11 add optional bind setting to relays
svn path=/icecast/trunk/icecast/; revision=15783
2009-03-17 01:45:41 +00:00
Karl Heyes
d784622396 non-blocking setting on win32 broke with previous patch. Add optional xml setting for
specifying the TCP send buffer size, it seems that on at least some win32 systems,
the window size stays at 8k (even with registry settings) which could limit available
streaming bandwidth.

svn path=/icecast/trunk/icecast/; revision=15766
2009-03-14 16:05:12 +00:00
Karl Heyes
1ab9b4a887 prevent logging lots of failed to reserve relay mountpoint. close #1513
svn path=/icecast/trunk/icecast/; revision=15764
2009-03-14 02:46:40 +00:00
Karl Heyes
9e118ca72b explicitly flag up a metadata update after they have been set. Could of led to
a non-crash type race between artist and title fields updating.  Also allow
passing a url setting, mapping to StreamURL in the icy metadata block, but do
not override any existing inline setting.

svn path=/icecast/trunk/icecast/; revision=15622
2009-01-15 03:38:49 +00:00
Karl Heyes
e6dfee632c Allow source client authentication via auth handler. Here the URL handler can
issue requests (using ithe stream_auth option) to allow external engines to
determine whether a client can stream or not. Admin requests using source auth
are able to use this mechanism however source clients using the icy protocol
cannot yet.


svn path=/icecast/trunk/icecast/; revision=15621
2009-01-14 01:18:22 +00:00
Karl Heyes
d49fd42eec lock order updates. hard to trigger case in source fallback. The other changes
are for consistency.

svn path=/icecast/trunk/icecast/; revision=15619
2009-01-11 16:46:08 +00:00
Karl Heyes
ed58514eaa Add handlers for spinlocks if available, map to mutexes when not.
svn path=/icecast/trunk/icecast/; revision=15614
2009-01-09 03:18:03 +00:00
Karl Heyes
add7342a14 Don't free up the second, third... header pages, as those are only referenced
once, only the first page is refcounted multiple times by the queue. Put some
checks in to help capture odd cases if they arise.

svn path=/icecast/trunk/icecast/; revision=15613
2009-01-08 03:35:54 +00:00
Karl Heyes
52129d4c5e oops, missed one from previous commit
svn path=/icecast/trunk/icecast/; revision=15612
2009-01-08 03:20:10 +00:00
Karl Heyes
deff3aa0ca avoid SOCK_NONBLOCK name clash with recent glibc. Add support for optional
bind parameter to connect_wto call. Some small compiler cleanups.

svn path=/icecast/trunk/icecast/; revision=15611
2009-01-08 02:47:44 +00:00
Karl Heyes
4ec4a90cb8 log: When keeping around log lines, only allocate what we actually use. Allow
compiler printf arg checking.
timing: win32 fix, don't use timeGetTime, fixes access log timestamp

svn path=/icecast/trunk/log/; revision=15610
2009-01-08 02:18:11 +00:00
ivo
cf3e3c8011 Do not allow Skeleton from taking control over the sync marks. Karl's proposal for the Vorbis+Skeleton issue.
svn path=/icecast/trunk/icecast/; revision=15529
2008-11-23 23:31:36 +00:00
Karl Heyes
3addc16981 reduce memory allocation and processing when retrieving stats for xsl pages
svn path=/icecast/trunk/icecast/; revision=15462
2008-10-29 02:47:41 +00:00
Karl Heyes
544c41ce60 missed from previous commit. we don't cleanup at this point anymore, doing so
could cause lost client connections.

svn path=/icecast/trunk/icecast/; revision=15426
2008-10-21 02:30:43 +00:00
Karl Heyes
d503f0bf5c guard for 2 NULL pointer cases raised by coverity. Neither should occur in practice
svn path=/icecast/trunk/icecast/; revision=15358
2008-10-01 01:07:29 +00:00
Karl Heyes
7b9b682a94 prevent minor memory leak, not usually triggered
svn path=/icecast/trunk/icecast/; revision=15318
2008-09-19 00:23:16 +00:00
Karl Heyes
72f8944c90 fix starting point problem with low bandwidth theroa streams. listener could
connect and be waiting a while before receiving stream content.

When retrieving streamlist, don't wait too long for connection to master

schedule a full stats rebuild on source disconnect.

Minor build fix for certain platforms with missing defines

svn path=/icecast/trunk/icecast/; revision=15276
2008-09-09 02:18:22 +00:00
Karl Heyes
a520a18e53 allow listener_remove only cases. clients were not attached to the auth at
connection time so the remove trigger could not be processed.

svn path=/icecast/trunk/icecast/; revision=15265
2008-09-08 00:40:25 +00:00
Karl Heyes
4c841bbe21 only allow raw admin metadata updates from the IP of the source client unless
the user is admin. It seems that some source clients issue metadata updates
even if they are rejected due to the mountpoint being in use.

svn path=/icecast/trunk/icecast/; revision=15264
2008-09-08 00:30:37 +00:00
Karl Heyes
30836f31c9 have a minimum update duration to prevent very frequent touch updates, no
point in creating extra YP load for this case.

svn path=/icecast/trunk/icecast/; revision=15263
2008-09-08 00:22:37 +00:00
Karl Heyes
d97233258c Make fserve thread start up only when required. In most cases this thread is
just in a sleep loop which means most clients getting to it have to wait. We
now just start the thread when there is work to do.  There is also some small
cleanup for the off_t type usage as well.

svn path=/icecast/trunk/icecast/; revision=15124
2008-07-22 02:37:32 +00:00
Karl Heyes
0bd5f9e74f Some have reported that if they do a series of requests in succession that
the overall time is very slow. This lag is mainly down to the sleep that
the connection and fserve threads do to prevent busy looping when idle. The
sleep has to expire even if requests are waiting.

This patch merges the tasks done by the connection and listener thread into
one thread.  It allows us to remove some locking, reduce thread usage and
service new connections more quickly as the poll/select acts as the busy
CPU prevention.

svn path=/icecast/trunk/icecast/; revision=15123
2008-07-22 02:24:30 +00:00
Karl Heyes
c6a0b4cc8b 2 on-demand relay fixups.
We prevent a failed relay from restarting too quickly but don't prevent
connecting listeners from getting to the source_t during that time. Drop the
on-demand status in the source_t during this period so listeners are rejected.
The setting is reset from relay eventually.

Relays without matching mount sections had no stats initially.


svn path=/icecast/trunk/icecast/; revision=15122
2008-07-19 01:57:53 +00:00
Karl Heyes
26c9b65eb0 expand debug log message to include a mountpoint reference
svn path=/icecast/trunk/icecast/; revision=15121
2008-07-19 01:36:16 +00:00
Karl Heyes
385d65b838 Don't include a per node lock unless it is really wanted. I don't think anyone
is using them currently, so lets reduce the structure size.  On win32, this
extra lock increases the handles usage considerably.

svn path=/icecast/trunk/avl/; revision=15120
2008-07-19 01:30:16 +00:00
Karl Heyes
1645c82128 handle a couple of possible odd misconfiguration cases with YP. Make sure the
peak_listeners stat is shown when relays are inactive.

svn path=/icecast/trunk/icecast/; revision=14934
2008-05-21 02:19:47 +00:00
Karl Heyes
06510b997b update from win32 build. Mostly cleanup work
svn path=/icecast/trunk/icecast/; revision=14867
2008-05-12 01:21:06 +00:00
Karl Heyes
90b705986c sanity check for unspecifed url
svn path=/icecast/trunk/icecast/; revision=14866
2008-05-11 23:20:50 +00:00
Karl Heyes
c59afc60d2 check if function exists, some older versions don't have this
svn path=/icecast/trunk/icecast/; revision=14825
2008-05-02 23:18:52 +00:00
Karl Heyes
f7e64956df fix busy retry bug on failure from previous patch
svn path=/icecast/trunk/icecast/; revision=14824
2008-05-02 16:10:22 +00:00
Karl Heyes
cbb7643b43 Allow any number of mountpoints to be returned for streamlist. You would
need a large number of mountpoints to trigger a truncation.  Allow file
serving thread to process a list of blocks for sending back to
the client. Then build the block list in the stats engine for returning.

svn path=/icecast/trunk/icecast/; revision=14812
2008-04-29 04:50:23 +00:00
Karl Heyes
2822e350bb htpasswd auth should apply even if no filename is specified, just reject all
new listeners with the reason logged. auth_t refcount was getting out of sync
which is a potential small memory leak.

svn path=/icecast/trunk/icecast/; revision=14788
2008-04-23 02:48:53 +00:00
Karl Heyes
a3d1ff8098 YP fixup for unusual cases. Inactive on-demand relays were not sending certain
details to stats engine.  On YP remove, make sure we find all nodes for that
montpoint not just the first. Allow at least 20mins from a failed touch before
next add, allows YP to give a longer wait period for misconfigured setups by
issuing a TouchFreq header on rejection.

svn path=/icecast/trunk/icecast/; revision=14787
2008-04-23 01:45:38 +00:00
Karl Heyes
cdfeb30444 handle new content-types
svn path=/icecast/trunk/icecast/; revision=14786
2008-04-23 00:32:20 +00:00
Karl Heyes
b2ce433a8f Add Kate and Skeleton codecs to ogg handler. patch by ogg.k.ogg.k
svn path=/icecast/trunk/icecast/; revision=14778
2008-04-19 02:11:37 +00:00
Karl Heyes
bded7d2564 Small cleanups. Prevent possible segv in relay definition if missing server tag.
Don't add to stream directory until a minute has passed, it seems like a few sites
are triggering YP requests because they are connecting and then dropping (probably
due to timeout), so at least make sure the stream is running a little while.

svn path=/icecast/trunk/icecast/; revision=14777
2008-04-19 02:04:17 +00:00
Karl Heyes
0047edd51c small update for failure case. retry times changed and limited redirection allowed
svn path=/icecast/trunk/icecast/; revision=14773
2008-04-18 01:12:45 +00:00
Karl Heyes
649c4fdc70 build fix for older setups with IPv6
svn path=/icecast/trunk/net/; revision=14545
2008-02-28 02:16:23 +00:00
Karl Heyes
c37e770ee0 avoid duplicate entries in playlist log
svn path=/icecast/trunk/icecast/; revision=14483
2008-02-12 04:15:45 +00:00
Karl Heyes
0868602bc0 win32 update. change build settings so that we make the process simpler, it
was very easy for the intermediate files to clash between projects.  The newer
libxml2/libxslt/libcurl also were causing some threading issues due to
library initialization


svn path=/icecast/trunk/icecast/; revision=14465
2008-02-11 01:00:41 +00:00
Karl Heyes
1cdc68cf1d Use poll if available, select can cause stack corruption if descriptor value is over 1024
svn path=/icecast/trunk/net/; revision=14457
2008-02-05 04:21:12 +00:00
Karl Heyes
3344ff6f09 if a directory server times out, reset the failing server stream entries so
that the streams go through the add process again in 15 mins. closes #689

svn path=/icecast/trunk/icecast/; revision=14452
2008-02-03 05:43:32 +00:00
Karl Heyes
22ee7b6b6e minor xml cleanup, reduce default log level, closes #775
svn path=/icecast/trunk/icecast/; revision=14450
2008-02-03 03:11:54 +00:00
Karl Heyes
22654d271c Handle missing mount in relay case, and add checks for NULL which may be an issue for libxml2.
svn path=/icecast/trunk/icecast/; revision=14430
2008-01-24 03:31:25 +00:00
Karl Heyes
4aa2f1e0eb fix possible junk chars passed back and don't call strftime each log line, under
glibc this calls for a stat of /etc/localtime each time

svn path=/icecast/trunk/log/; revision=14429
2008-01-24 03:28:11 +00:00
Karl Heyes
6331e2ee77 fix default operation for manageauth
svn path=/icecast/trunk/icecast/; revision=14339
2008-01-03 15:18:52 +00:00
Karl Heyes
03e18677e4 drop const usage and work around a FBSD issue with listening sockets
svn path=/icecast/trunk/net/; revision=14319
2007-12-20 16:49:02 +00:00
Karl Heyes
6bcbb416b9 make sure we report the correct port for m3u and YP when not using the default port
svn path=/icecast/trunk/icecast/; revision=14318
2007-12-20 16:36:37 +00:00
Karl Heyes
2ccfe3caa5 port 8000 could be set to listen on when not wanted
svn path=/icecast/trunk/icecast/; revision=14314
2007-12-19 19:09:04 +00:00
Karl Heyes
0e533ac490 reduce wasted memory on 64bit systems, 32bit has no change
svn path=/icecast/trunk/avl/; revision=14308
2007-12-15 17:51:33 +00:00
Karl Heyes
73401b80d5 prevent NULL dereference
svn path=/icecast/trunk/icecast/; revision=14307
2007-12-15 17:21:22 +00:00
Karl Heyes
02cc6c5f10 type cleanups. reduces memory usage on 64bit, no difference on 32bit. closes #780
svn path=/icecast/trunk/icecast/; revision=14306
2007-12-15 17:02:16 +00:00
Karl Heyes
7b6b874b02 type cleanups. Use C99 defines if available and a missed sock_t on win32. This
resolves some warnings on win32 and x86_64

svn path=/icecast/trunk/icecast/; revision=14223
2007-11-23 16:27:10 +00:00
Karl Heyes
89dac2e3cf minor header cleanup
svn path=/icecast/trunk/icecast/; revision=14219
2007-11-23 03:17:39 +00:00
Karl Heyes
6ee33215e8 fix long standing copy+paste error.
svn path=/icecast/trunk/icecast/; revision=14218
2007-11-23 02:48:37 +00:00
Karl Heyes
7d8182eef5 minor cleanups, no functional change
svn path=/icecast/trunk/icecast/; revision=14206
2007-11-21 02:55:11 +00:00
Michael Smith
ab1447d35b Don't make autogen.sh look for a specific version of automake (seems to still
work)

Include <errno.h> in connection.c; hopefully fixes Geoff Shang's compilation
problems.

svn path=/icecast/trunk/icecast/; revision=14155
2007-11-15 15:12:21 +00:00
Karl Heyes
197be21d1c only pass clients to url auth handler if the trigger is defined in the xml
svn path=/icecast/trunk/icecast/; revision=14115
2007-11-08 20:00:54 +00:00
Karl Heyes
66b68170cc auth sync up. Fix longstanding race bug and make stream start/stop triggers work again.
svn path=/icecast/trunk/icecast/; revision=14114
2007-11-08 19:52:51 +00:00
Karl Heyes
b4b8e3e552 fix bad pointer bug for libcurl and small memory leak over reload of xml
svn path=/icecast/trunk/icecast/; revision=14108
2007-11-08 03:21:33 +00:00
Karl Heyes
0a347a6817 allow for multiple shoutcast style source clients to connect. They don't
provide a mountpoint so you specify a shoutcast-mount in the listen-socket
section. Specifying this will automatically define the port+1 with the same
settings however the original shoutcast-compat approach is maintained.

svn path=/icecast/trunk/icecast/; revision=14045
2007-10-25 02:25:49 +00:00
Karl Heyes
88514b9c8e fix minor memory leak on failed shoutcast source auth
svn path=/icecast/trunk/icecast/; revision=14044
2007-10-25 01:03:47 +00:00
Karl Heyes
af1c8da6b6 more sock_t cleanups, win32 should have less warnings now
svn path=/icecast/trunk/icecast/; revision=14043
2007-10-24 22:42:49 +00:00
Karl Heyes
089dd4c273 return type was wrong, although it probably won't affect stability
svn path=/icecast/trunk/icecast/; revision=14042
2007-10-24 22:40:42 +00:00
Karl Heyes
9c155dda50 clean up prototypes and sock_t handling, for win32 mainly, no functional change
svn path=/icecast/trunk/net/; revision=14041
2007-10-24 21:42:01 +00:00
Karl Heyes
4b5f00993d Allow for files to be specified that will contain IPs that can be used to
accept or deny client connections.

svn path=/icecast/trunk/icecast/; revision=14039
2007-10-23 22:25:31 +00:00
Karl Heyes
9379e4e051 *sigh, missing ; at least the coverity list should be clear again
svn path=/icecast/trunk/icecast/; revision=14033
2007-10-22 02:57:56 +00:00
Karl Heyes
ef8a91c8e6 minor memory leak on resource failure case
svn path=/icecast/trunk/icecast/; revision=14032
2007-10-22 02:52:16 +00:00
Karl Heyes
148af4e6ee merge work. mainly stats and some log message updates
svn path=/icecast/trunk/icecast/; revision=14031
2007-10-22 02:29:49 +00:00
Karl Heyes
27f58c1189 boundary limit check was wrong, we won't be able to match any of the listen sockets
svn path=/icecast/trunk/icecast/; revision=14030
2007-10-22 02:23:10 +00:00
Karl Heyes
a26bb50004 fix some potential minor memory leaks
svn path=/icecast/trunk/icecast/; revision=14018
2007-10-20 01:58:14 +00:00
Karl Heyes
549127b9f5 a missing break from a previous auth update was preventing url auth from being
used

svn path=/icecast/trunk/icecast/; revision=14017
2007-10-20 01:55:18 +00:00
Karl Heyes
ab75a3297f add global listeners stat
svn path=/icecast/trunk/icecast/; revision=14016
2007-10-20 00:58:05 +00:00
Karl Heyes
dcffbb38ad header fixup for listeners. Tell any proxies to not cache and add minor tweaks
for flash players. closes #1115

svn path=/icecast/trunk/icecast/; revision=14014
2007-10-19 14:06:07 +00:00
Karl Heyes
f9c3fc91a7 updates to range header handling. closes #1246, #810
svn path=/icecast/trunk/icecast/; revision=14006
2007-10-17 23:49:14 +00:00
Karl Heyes
55b5b7eb80 minor memory leak fixed
svn path=/icecast/trunk/icecast/; revision=14004
2007-10-17 02:35:48 +00:00
Karl Heyes
ba438dd7b5 Don't impose a limit on the number of listening sockets allowed in the xml
svn path=/icecast/trunk/icecast/; revision=13995
2007-10-16 01:53:06 +00:00
Karl Heyes
e065acb7f1 no functional/structural change but cleans up the annoying signed/unsigned pointer warnings
here with xmlChar, based on work originally done by gtgbr@gmx.net.
closes #783, #784, #785, #787

svn path=/icecast/trunk/icecast/; revision=13933
2007-10-04 16:48:38 +00:00
Karl Heyes
da893d8b3b missed these from previous commit, these checks are redundant now
svn path=/icecast/trunk/icecast/; revision=13930
2007-10-04 01:44:05 +00:00
Karl Heyes
807f95243f Make copies of the default string values instead of relying on the compiler to check
for duplicate string literals.

svn path=/icecast/trunk/icecast/; revision=13929
2007-10-04 00:55:13 +00:00
Karl Heyes
43988cac59 Allow buildm3u to work with the mount given, no need to check the source tree. closes #866
svn path=/icecast/trunk/icecast/; revision=13908
2007-09-28 00:54:01 +00:00
Karl Heyes
b8ab793867 make sure mount authentication has a type specified
svn path=/icecast/trunk/icecast/; revision=13877
2007-09-22 01:21:17 +00:00
Karl Heyes
7735a94ee6 add guards for NULL dereference
svn path=/icecast/trunk/avl/; revision=13799
2007-09-14 03:09:32 +00:00
Karl Heyes
e99eee6c80 small build fix and a minor issue highlighted by coverity
svn path=/icecast/trunk/icecast/; revision=13798
2007-09-14 03:01:17 +00:00
Karl Heyes
337f4a3272 make sure config lock is released in all failure cases of manageauth
svn path=/icecast/trunk/icecast/; revision=13792
2007-09-13 01:32:15 +00:00
Karl Heyes
03a4d5298f convert the passed value
svn path=/icecast/trunk/icecast/; revision=13755
2007-09-05 03:25:14 +00:00
Karl Heyes
d43254853f allow mount param for webroot xsl pages, closes #990
svn path=/icecast/trunk/icecast/; revision=13754
2007-09-05 02:16:45 +00:00
Karl Heyes
2c67cfffb2 fix for #734. Allow /admin/stats[.xsl] to take an optional mount arg which only
returns global stats and stats for that particular mountpoint.


svn path=/icecast/trunk/icecast/; revision=13709
2007-09-03 22:04:04 +00:00
Karl Heyes
d327fc8914 close report #704, add server-id tag, default stays as the server version string.
svn path=/icecast/trunk/icecast/; revision=13704
2007-09-03 00:55:27 +00:00
Karl Heyes
47def32074 missed some NULL checks from previous character set commit. Add optional charset
setting on metadata update request and conversion code for it.


svn path=/icecast/trunk/icecast/; revision=13663
2007-08-30 23:36:19 +00:00
Karl Heyes
7e5604b993 merge work. allow sockets to be marked as ssl capable. This is mainly for /admin
requests but can be used for sources and listeners

svn path=/icecast/trunk/icecast/; revision=13650
2007-08-29 03:51:22 +00:00
Karl Heyes
31ce005ef3 small const update, add NULL check, NULL shouldn't occur here but it's better to play safe
svn path=/icecast/trunk/icecast/; revision=13649
2007-08-29 02:01:28 +00:00
Karl Heyes
9e078e714f allow xsl requests to go through the authentication code
svn path=/icecast/trunk/icecast/; revision=13628
2007-08-25 16:04:33 +00:00
Karl Heyes
5a7111fc82 Fix bug #895. Most if not all non-Ogg streams send metadata as non-UTF8, typically
ISO-8859-1 is assumed as there is no real clarity wrt the spec. In most cases people
send ASCII so it's not an issue, but for some, the extended characters they send
can cause problems with XML processing.  As stats and YP require UTF8 we need to
translate them and block invalid cases.

For the moment, for non-Ogg streams only, we assume that the metadata needs converting
from ISO-8859-1. Ogg streams are UTF8 so no conversion needed. You can override the
default with a charset mount option.


svn path=/icecast/trunk/icecast/; revision=13615
2007-08-24 15:44:37 +00:00
Karl Heyes
fe0e17dbaa fix bug #1141
svn path=/icecast/trunk/icecast/; revision=13595
2007-08-23 16:58:18 +00:00
Karl Heyes
176b9f7eca Auth update. Have each auth_t has its own queue of requests and thread to process
them. Each listener connection for each request is checked as connected before
performing the request (so that time isn't wasted on slow authentication). Various
name/comment cleanups as well.

svn path=/icecast/trunk/icecast/; revision=13583
2007-08-21 22:30:30 +00:00
Karl Heyes
620c51f699 added function to check whether the socket is still alive
svn path=/icecast/trunk/net/; revision=13582
2007-08-21 22:17:13 +00:00
Karl Heyes
bd266785ad fix possible crash
svn path=/icecast/trunk/icecast/; revision=13561
2007-08-16 23:03:03 +00:00
Karl Heyes
3910d1caf9 const updates, again no functional change
svn path=/icecast/trunk/httpp/; revision=13560
2007-08-16 22:52:24 +00:00
Karl Heyes
5f8cfd70f7 const updates, no functional changes
svn path=/icecast/trunk/icecast/; revision=13559
2007-08-16 22:49:13 +00:00
Karl Heyes
eebb33b8a1 add general information to stats
svn path=/icecast/trunk/icecast/; revision=13553
2007-08-16 02:13:18 +00:00
Karl Heyes
f1c6cf9d4e Allow rereading of the mime types file on xml reload. Also allow for specifying
an alternative filename in the xml.

svn path=/icecast/trunk/icecast/; revision=13541
2007-08-13 21:33:27 +00:00
Karl Heyes
e06793a7ad handle .xspf requests. Like m3u, send a webroot file if it exists else generate
one. The generated one comes from an xslt in adminroot. Just need some icons

svn path=/icecast/trunk/icecast/; revision=13539
2007-08-11 18:26:44 +00:00
Karl Heyes
bb0b1a2a32 Triggers for source stats updated. No point updating all source stats if fewer
need updating. Fixes a few unusual cases, if a mount was removed (with xml reload)
whilst no source was reserved then those stats were left behind.

svn path=/icecast/trunk/icecast/; revision=13538
2007-08-11 17:44:45 +00:00
Karl Heyes
2a0c3cdefa Don't hardcode content type of xslt files to html, allow xsl to determine it
svn path=/icecast/trunk/icecast/; revision=13534
2007-08-11 00:24:51 +00:00
Karl Heyes
b3b2695a1d Handle http 302 response when a relay starts. The socket IO is isolated into a
separate function for loop handling and log messages are updated.


svn path=/icecast/trunk/icecast/; revision=13533
2007-08-10 21:33:16 +00:00
Karl Heyes
2b817daea2 fix possible segv case, and only increase certain listener stats when stream is
active (on demand relays may not actually start when triggered)

svn path=/icecast/trunk/icecast/; revision=13503
2007-08-10 13:04:40 +00:00
Karl Heyes
fe5c9e62cc minor build update
svn path=/icecast/trunk/net/; revision=13501
2007-08-09 23:51:26 +00:00
Karl Heyes
7248d653c0 Update the streamlist handler for slaves. Get the list of non-hidden mountpoints
from the stats engine instead of the mount or source list, as the stats are
populated by non-mount defined streams and mounts with active fallbacks.

svn path=/icecast/trunk/icecast/; revision=13500
2007-08-09 23:36:29 +00:00
Karl Heyes
3e8f2c39d4 fix problem case when listeners are moved by another thread, eg a fallback
override is triggered, and on-demand relays are not shut down or stats are
not updated.

svn path=/icecast/trunk/icecast/; revision=13496
2007-08-09 15:43:00 +00:00
Karl Heyes
7c6c79c416 build fix with libcurl 7.16 onwards
svn path=/icecast/trunk/icecast/; revision=13495
2007-08-09 12:24:33 +00:00
Karl Heyes
adac7ebee4 if addresses come back as IPv4-mapped IPv6 then make it look like IPv4 or else
we'll get queries about the access log.  Fix a potential FD leak and add a
small delay into the listener thread if accept fails, the usual cause is an FD
limit being reached triggering logs to fill up and CPU to max out.


svn path=/icecast/trunk/icecast/; revision=13492
2007-08-09 03:36:03 +00:00
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
Karl Heyes
29c83ae4eb update a few stats
svn path=/icecast/trunk/icecast/; revision=9437
2005-06-11 01:24:58 +00:00
Karl Heyes
554649cf01 this is needed for linuxthreads, without it, zombie processes are left
when on-[dis]connect is used

svn path=/icecast/trunk/icecast/; revision=9435
2005-06-10 18:01:53 +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
52787eeeaa increase default max queue size, 100k isn't much and we do reduce it when
there are no lagging clients

svn path=/icecast/trunk/icecast/; revision=9420
2005-06-09 15:32:19 +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
d4abe04f9f send StreamTitle in metadata when reading from intro file
svn path=/icecast/trunk/icecast/; revision=9417
2005-06-09 13:05:02 +00:00
oddsock
e84ce44d6c gotta love windows.. _snprintf is *much* more readable than snprintf (not)...
also, some updates to the VC project files 

svn path=/icecast/trunk/icecast/; revision=9410
2005-06-09 04:05:28 +00:00
Karl Heyes
fd19feb3c5 using .filename causes problems with absolute paths for the temp file, also
test to see if file exists already

svn path=/icecast/trunk/icecast/; revision=9407
2005-06-09 02:21:03 +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
b8f6429198 send StreamTitle in the initial metadata block, if not real/helix has
trouble with playback

svn path=/icecast/trunk/icecast/; revision=9376
2005-06-06 15:39:26 +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
f1d39a8788 send response header to stats client
svn path=/icecast/trunk/icecast/; revision=9330
2005-05-31 02:40:23 +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
dc0d4e15fd fix win32 access.log entries, the rest is just cosmetic
svn path=/icecast/trunk/icecast/; revision=9307
2005-05-25 01:43:33 +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
018fff1158 Allow for username to be stated for master/slave setups, we still default
to 'relay' though

svn path=/icecast/trunk/icecast/; revision=9274
2005-05-13 00:35:08 +00:00
Karl Heyes
a922caa7f4 removed redundant function, add total files requested to stats
svn path=/icecast/trunk/icecast/; revision=9247
2005-05-10 00:28:37 +00:00
Karl Heyes
99a9e4e3a9 missed header for dist tarball
svn path=/icecast/trunk/icecast/; revision=9242
2005-05-08 14:27: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
22aa8719e2 allow for changes in relay settings to trigger a relay restart
svn path=/icecast/trunk/icecast/; revision=9226
2005-05-07 11:50:07 +00:00
Karl Heyes
b1dcee52a8 Add more Ogg codec handlers, there has not been that much testing on these
mainly due to client support, but they are only for detection and plug
straight into the ogg handler.
The win32 project files will need updating to take the new files into account

svn path=/icecast/trunk/icecast/; revision=9225
2005-05-07 11:01:35 +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
acc79b778f from branch. make streamlist.txt from the mount list, so that fallback handling
can be taken into account. If we just use the source tree then entries can
disappear causing a relay to shutdown in the slave.

svn path=/icecast/trunk/icecast/; revision=9213
2005-05-05 20:05: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
9253bf7248 merge from branch, stats client details are not being removed when they exit
svn path=/icecast/trunk/icecast/; revision=9195
2005-05-01 02:04:11 +00:00
Karl Heyes
acd1b8ad96 merge from branch, make the config lock a rwlock instead of mutex
svn path=/icecast/trunk/icecast/; revision=9160
2005-04-20 22:34:54 +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
Karl Heyes
f502efd2f5 simple sanity check
svn path=/icecast/trunk/httpp/; revision=9126
2005-04-08 03:48:08 +00:00
Michael Smith
f28ded9fbb A bug report indirectly suggested the base64 decode code was confusing (as the
treatment of padding was un-obvious), so added a comment explaining it.

svn path=/icecast/trunk/icecast/; revision=9075
2005-03-14 23:41:11 +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
Michael Smith
af3d1f716b Remove references to -h option, which doesn't exist, and which users could only
ever find out about by running a command that did what -h claimed to do.


svn path=/icecast/trunk/icecast/; revision=8976
2005-02-24 00:39:08 +00:00
brendan
82a9fa3bc7 Whoops, don't spin if ufds is null.
svn path=/icecast/trunk/icecast/; revision=8959
2005-02-19 22:44:09 +00:00
brendan
00749e6a68 The poll version of fserve_client_waiting causes icecast to die with an
assertion when it first starts up on OS X, because ufds starts out NULL.
I'd been using the select version until now and never noticed.

svn path=/icecast/trunk/icecast/; revision=8956
2005-02-19 20:56:04 +00:00
Michael Smith
bada4b1c41 Make a debug message into a warning message, so it'll be logged more often
(since it's useful), and make it print out the file that it failed to find,
so that users can figure out what to do.


svn path=/icecast/trunk/icecast/; revision=8934
2005-02-16 00:54:55 +00:00
Michael Smith
533dfb6b0f Fix spelling in debug messages.
svn path=/icecast/trunk/icecast/; revision=8774
2005-01-21 06:44:21 +00:00
Karl Heyes
df919a9691 only unlock when we have finished with the stylesheet, potential race otherwise
svn path=/icecast/trunk/icecast/; revision=8723
2005-01-11 16:36:34 +00:00
Karl Heyes
6c4c02d482 small fixes
svn path=/icecast/trunk/icecast/; revision=8596
2005-01-03 17:48:54 +00:00
oddsock
c0a79970f9 remove depricated include file
svn path=/icecast/trunk/icecast/; revision=8510
2004-12-21 19:23:35 +00:00
Karl Heyes
f0e7a859ab minor type cleanup in fserve, include correct header for ogg
svn path=/icecast/trunk/icecast/; revision=8481
2004-12-18 00:11:56 +00:00
Karl Heyes
e59095b11a make vorbis specific stat names consistent with the existing ones, and make
sure if unknown ogg codecs are sent then it is logged

svn path=/icecast/trunk/icecast/; revision=8480
2004-12-17 21:05:20 +00:00
Karl Heyes
a2c849ed7c make recent YP updates follow agreed spec
svn path=/icecast/trunk/icecast/; revision=8479
2004-12-17 20:03:26 +00:00
oddsock
ad39d9a450 removed unneeded variable
svn path=/icecast/trunk/icecast/; revision=8369
2004-12-10 23:24:08 +00:00
Karl Heyes
66568ed242 fix minor memory leak
svn path=/icecast/trunk/icecast/; revision=8364
2004-12-10 17:27:06 +00:00
Karl Heyes
d077dc4b28 add subtype to yp add phase, this is to identify the codecs in use
svn path=/icecast/trunk/icecast/; revision=8360
2004-12-10 00:11:16 +00:00
Karl Heyes
4066a89c01 allow a relay to provide user/pass when connecting
svn path=/icecast/trunk/icecast/; revision=8358
2004-12-09 17:08:52 +00:00
j
1e839f83ea - add video_quality
- update status.xsl with new info about theora streams

svn path=/icecast/trunk/icecast/; revision=8355
2004-12-08 20:13:17 +00:00
Karl Heyes
92e2c8f81c added theora stats
svn path=/icecast/trunk/icecast/; revision=8354
2004-12-08 19:31:33 +00:00
Karl Heyes
9fd0b2974f I should fix the leak properly :)
svn path=/icecast/trunk/icecast/; revision=8349
2004-12-08 02:36:03 +00:00
Karl Heyes
d124e7ca32 duplicate unlock left in
svn path=/icecast/trunk/icecast/; revision=8348
2004-12-08 02:30:01 +00:00
Karl Heyes
ee1c27509c provide max_listeners to YP, yp touch fixup and minor memory leak fixed
svn path=/icecast/trunk/icecast/; revision=8347
2004-12-08 02:28:07 +00:00
oddsock
f09ae872d6 removal of old and unused code
add '+' to those fields that are url decoded.

svn path=/icecast/trunk/httpp/; revision=8346
2004-12-07 22:42:50 +00:00
oddsock
b3d5a657d2 add a new web admin feature which allows the updating of metadata (now that we support metadata updates for most stream types). This is an new admin feature.
add cluster-password to the config to allow for future clustering of relays on the xiph stream directory.

svn path=/icecast/trunk/icecast/; revision=8345
2004-12-07 22:29:46 +00:00
oddsock
eb9e11b0c6 win32 compile
svn path=/icecast/trunk/icecast/; revision=8342
2004-12-07 21:47:28 +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
Karl Heyes
c7432d6602 minor cleanups
svn path=/icecast/trunk/icecast/; revision=8236
2004-11-20 02:16:59 +00:00
Karl Heyes
7dfcbf560c skip the listing of the source mountpoint when moveclients is requested
without a destination

svn path=/icecast/trunk/icecast/; revision=8235
2004-11-19 23:04:27 +00:00
Karl Heyes
889e260490 allow for shoutcast metadata updates to auth with admin/per-mount/global
source password

svn path=/icecast/trunk/icecast/; revision=8232
2004-11-19 15:05:36 +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
524d467a25 missing test from a previous patch, the running check needs to apply as well
svn path=/icecast/trunk/icecast/; revision=8223
2004-11-18 19:47:39 +00:00
Karl Heyes
b2b2850708 prevent updated metadata being passed to listeners when the text hasn't
actually changed

svn path=/icecast/trunk/icecast/; revision=8214
2004-11-17 20:35:35 +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
Karl Heyes
14f88b3267 pass the fserve_t not the client_t
svn path=/icecast/trunk/icecast/; revision=8212
2004-11-17 14:12:39 +00:00
oddsock
241dd76291 need to fail properly
svn path=/icecast/trunk/icecast/; revision=8206
2004-11-16 04:27:00 +00:00
oddsock
083f5c0cd1 this patch adds a playlist log to icecast. This can be used to maintain an audit trail of metadata that comes through icecast. The format of the log file may be changed in the future as we decide on a good format.
svn path=/icecast/trunk/icecast/; revision=8205
2004-11-16 04:04:02 +00:00
oddsock
d7a30dc0cf darn ansi C.....
svn path=/icecast/trunk/icecast/; revision=8202
2004-11-15 15:55:43 +00:00
oddsock
acbef39c57 a few fixes from karl...
svn path=/icecast/trunk/icecast/; revision=8201
2004-11-15 15:50:59 +00:00
oddsock
726e8fc099 should be a long long, instead of a long
svn path=/icecast/trunk/icecast/; revision=8200
2004-11-15 03:53:16 +00:00
oddsock
fa56e5b64d much better support for the Range request header, which means that seeking actually *works* now for file serving.
svn path=/icecast/trunk/icecast/; revision=8199
2004-11-15 03:50:42 +00:00
Michael Smith
5850a9b3c3 Use 64 bit content-length for fileserving (if supported by system)
svn path=/icecast/trunk/icecast/; revision=8196
2004-11-11 22:36:03 +00:00
oddsock
4e20c79edf add Content-Length to files served via the fserve to enable seeking
svn path=/icecast/trunk/icecast/; revision=8192
2004-11-11 16:21:01 +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
a01317753d added a content-length for flash-based players. This will allow for them to stream mp3 from icecast.
svn path=/icecast/trunk/icecast/; revision=8160
2004-11-04 15:55:13 +00:00
Karl Heyes
89bffcd104 add fallback mime type for css
svn path=/icecast/trunk/icecast/; revision=8154
2004-11-01 23:41:58 +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
17c178555f correct type for volatile usage and uncomment log message for stats updating
svn path=/icecast/trunk/icecast/; revision=8123
2004-10-27 14:13:29 +00:00
oddsock
f86d02bb58 add volatile keywords to a few variables
reset max_interval back to 0 on slave initialization

svn path=/icecast/trunk/icecast/; revision=8112
2004-10-27 03:29:56 +00:00
Karl Heyes
9652319c38 An alias could disappear from under us, so copy the string
svn path=/icecast/trunk/icecast/; revision=8108
2004-10-26 19:29:12 +00:00
Karl Heyes
7eed9c793b small updates. reject source client with invalid mountpoint, avoid aliasing
issues with queue and id, and change handler to avoid leaving clients on the
connection queue (rare)

svn path=/icecast/trunk/icecast/; revision=8107
2004-10-26 16:31:16 +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
bc9ab55cbb avoid aliasing issues, and make sure each server can take a seperate
default interval as defined in the xml

svn path=/icecast/trunk/icecast/; revision=8101
2004-10-25 21:10:10 +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
oddsock
a52caeb2b0 fix line endings...
svn path=/icecast/trunk/icecast/; revision=8096
2004-10-25 15:51:50 +00:00
Karl Heyes
000a33b9cb a couple of potential bad pointer type problems
svn path=/icecast/trunk/icecast/; revision=8095
2004-10-25 15:42:04 +00:00
oddsock
b8f3963aad Fix CLF on win32. Apparently, windows doesn't support the %z flag of strftime() so we need to roll our own...Buzilla Bug #509
svn path=/icecast/trunk/icecast/; revision=8091
2004-10-25 14:43:07 +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
Karl Heyes
80561957f0 fix a busy CPU case when slow and fast file serving clients are connected at
the same time.  Flag clients on return from select/poll and only process those.
Also fix a rare race which could leave clients in pending

svn path=/icecast/trunk/icecast/; revision=8070
2004-10-24 00:34:15 +00:00
Karl Heyes
17537d2457 When starting relay threads, have the relay thread do the connection not the
slave thread.  Also improve cleanup handling and log messages as well

svn path=/icecast/trunk/icecast/; revision=8068
2004-10-23 00:44:29 +00:00
Michael Smith
1c28b0cce1 Correct a typo in one message, and change "WARNING" to "ERROR" in another,
since it's a fatal error.


svn path=/icecast/trunk/icecast/; revision=7983
2004-10-12 04:49:56 +00:00
Karl Heyes
75bb8ea0ce merged from kh branch, allow for handling the vsnprintf return code better
on older systems.

svn path=/icecast/trunk/net/; revision=7917
2004-10-06 14:07:55 +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
afde2e509c the YP code could end up maintaining duplicate entries if the source
reconnect delay is very short.

svn path=/icecast/trunk/icecast/; revision=7761
2004-09-15 14:21:04 +00:00
Karl Heyes
079c759e6d passed pointer could be NULL
svn path=/icecast/trunk/icecast/; revision=7615
2004-08-23 19:01:18 +00:00
Karl Heyes
1fe2325479 add optional tags to example xml and remove unused source_t item
svn path=/icecast/trunk/icecast/; revision=7607
2004-08-22 15:00:35 +00:00
Karl Heyes
ac73dff07a Add a couple of warnings, YP code not built and failed streamlist
from master server

svn path=/icecast/trunk/icecast/; revision=7599
2004-08-21 12:56:24 +00:00
Karl Heyes
2a991af1a6 unlikely to occur race, but fix it anyway
svn path=/icecast/trunk/icecast/; revision=7597
2004-08-20 22:59:09 +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
15016583ab make caller of restart_logging pass the config, don't assume it's locked
svn path=/icecast/trunk/icecast/; revision=7595
2004-08-20 21:40:44 +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
Michael Smith
490e64663c -b was broken. Fix it.
svn path=/icecast/trunk/icecast/; revision=7509
2004-08-10 05:17:56 +00:00
Karl Heyes
ebebad5e74 add extra boundary checks when splitting headers
svn path=/icecast/trunk/httpp/; revision=7507
2004-08-10 00:03:14 +00:00
Karl Heyes
dac2723dbe encode any xml entities in the stats before applying them to the
xsl pages

svn path=/icecast/trunk/icecast/; revision=7494
2004-08-07 02:33:12 +00:00
oddsock
ebecd7cb0a fix m3u generation logic that was not working for static files
svn path=/icecast/trunk/icecast/; revision=7439
2004-07-31 22:25:07 +00:00
Karl Heyes
62bff456c2 make sure sock_connected does not block with timeout 0, use -1
for that, also handle the sock_connected return values properly
in the case of timeout.

svn path=/icecast/trunk/net/; revision=7349
2004-07-26 16:03:52 +00:00
Michael Smith
bef7e4e022 Make it even more explicit what went wrong when log opening failed, since many
people don't seem to be able to figure it out.


svn path=/icecast/trunk/icecast/; revision=7265
2004-07-23 02:49:33 +00:00
oddsock
a4a8186681 forgot to switch the default value too..thanks Brendan..
svn path=/icecast/trunk/icecast/; revision=7257
2004-07-22 18:34:28 +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
brendan
8d52fab499 Add source comment to previous metadata bug fix: [sic]
svn path=/icecast/trunk/icecast/; revision=7100
2004-07-12 02:21:18 +00:00
brendan
54c90a90fe Migrate .cvsignore to svn:ignore
svn path=/icecast/trunk/log/; revision=7091
2004-07-11 16:51:34 +00:00
brendan
16e1815f14 Migrate .cvsignore to svn:ignore
svn path=/icecast/trunk/icecast/; revision=7090
2004-07-11 16:50:28 +00:00
brendan
085f8d61aa The inline metadata text was losing the final character when the string length was a
multiple of 16.

svn path=/icecast/trunk/icecast/; revision=7089
2004-07-11 16:46:02 +00:00
brendan
b235f57273 Move .cvsignore into svn:ignore
svn path=/icecast/trunk/avl/; revision=7021
2004-07-06 19:22:26 +00:00
Karl Heyes
a99d5ef19b minor build fix
svn path=/icecast/trunk/httpp/; revision=6874
2004-06-25 19:39:12 +00:00
Karl Heyes
813d54bee1 wait 5 mins on failed YP request, also log a default
message if no error message is sent back

svn path=/icecast/trunk/icecast/; revision=6862
2004-06-25 18:25:10 +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
fe2a763e9e make sure YP entries are flushed out when a source stops. Avoid
segv on failed icecast startup and add some log messages.

svn path=/icecast/trunk/icecast/; revision=6807
2004-06-02 19:34:14 +00:00
oddsock
fcef29c60a remove geturl.c from icecast.dsp
add a #define for snprintf for win32

svn path=/icecast/trunk/icecast/; revision=6757
2004-05-26 02:37:20 +00:00
oddsock
56cd1de3c5 added ability to disallow concurrent connections from the same username if using htpasswd listener authentication.
svn path=/icecast/trunk/icecast/; revision=6711
2004-05-17 04:33:46 +00:00
Michael Smith
71388d47c6 Some servers apparently send a Content-Type header of audio/x-mpeg.
Make icecast understand this.


svn path=/icecast/trunk/icecast/; revision=6649
2004-05-11 02:24:18 +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
Michael Smith
dc9903512d Use remove() then rename() only on win32 - where it's required.
Don't use it on unix systems, which don't need it, and where doing 
_only_ rename() preserves atomicity. 

svn path=/icecast/trunk/icecast/; revision=6625
2004-05-05 05:05:05 +00:00
oddsock
dfdff77871 some special handling with rename() needed for win32
svn path=/icecast/trunk/icecast/; revision=6616
2004-05-03 14:59:40 +00:00
oddsock
e597b63c6a proper config file handling...
svn path=/icecast/trunk/icecast/; revision=6615
2004-05-03 14:56:57 +00:00
oddsock
15b9c16c1c patch to allow public listing of shoutcast servers that are relaying icecast streams
svn path=/icecast/trunk/icecast/; revision=6614
2004-05-03 14:55:44 +00:00
oddsock
9f7895bd42 created an auth page which can be used to serve appropriate m3u's which contain authentication information.
svn path=/icecast/trunk/icecast/; revision=6612
2004-04-30 17:32:34 +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
Michael Smith
cd47258bb4 Disable burst-on-connect by default
svn path=/icecast/trunk/icecast/; revision=6607
2004-04-30 02:28:58 +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
935a06ef55 Fix copy/paste error in sending 400 errors (reported by wayne zhao).
svn path=/icecast/trunk/icecast/; revision=6553
2004-04-20 07:05:07 +00:00
Michael Smith
c2b3ed7146 Fix overflow when base64 decoding invalid base64.
svn path=/icecast/trunk/icecast/; revision=6533
2004-04-19 02:55:56 +00:00
Michael Smith
a66e69cb1c Give details in error messages on failure to open log files.
svn path=/icecast/trunk/icecast/; revision=6495
2004-04-07 01:53:46 +00:00
Michael Smith
e8eddcd7b4 Make icecast keep parsing command line options after -c.
Error message if fork fails.

All untested; the conversion broke the build.


svn path=/icecast/trunk/icecast/; revision=6152
2004-03-22 02:16:57 +00:00
Michael Smith
ba356d5eaf Another patch from Dale Ghent, this silences some warnings from the compiler.
svn path=/trunk/icecast/; revision=5928
2004-03-09 23:52:20 +00:00
Michael Smith
5edb4df406 Revert previous; this was fixed in a better way.
svn path=/trunk/icecast/; revision=5927
2004-03-09 23:49:24 +00:00
Michael Smith
a11d01b268 Use sys/types.h in md5.c, patch from Dale Ghent
svn path=/trunk/icecast/; revision=5926
2004-03-09 23:41:58 +00:00
giles
287ed24dd8 Include inttypes.h from the compatibility header if it's available and stdint.h is not. This
provides the stdint types on solaris and a number of other non-C99 platforms.

svn path=/trunk/icecast/; revision=5925
2004-03-09 18:33:06 +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
Michael Smith
fa8ceacb5c Oops. Hack up the macro some more so it compiles properly.
svn path=/trunk/icecast/; revision=5878
2004-03-02 00:10:58 +00:00
Michael Smith
398dfff59d Fix macro to use ; instead of ,
This gets rid of some warnings in later gcc versions.

svn path=/trunk/icecast/; revision=5875
2004-03-01 02:28:48 +00:00
Karl Heyes
c8ecb463f9 remove warning wrt time_t
svn path=/trunk/icecast/; revision=5874
2004-02-29 14:55:04 +00:00
Karl Heyes
6ba8c0b2cd free up any per-client format specific resources, fixes a small memory
leak with mp3 streams

svn path=/trunk/icecast/; revision=5873
2004-02-29 14:38:15 +00:00
Karl Heyes
a255c92b5f update move clients code, small cleanups in other places
svn path=/trunk/icecast/; revision=5869
2004-02-27 15:15:40 +00:00
Karl Heyes
9916341436 separate source initialisation, and collect the YP setup code into one area
svn path=/trunk/icecast/; revision=5868
2004-02-26 16:51:43 +00:00
Karl Heyes
aff756a4c7 Add per mount queue size and source timeout, which can override the
general settings.

svn path=/trunk/icecast/; revision=5867
2004-02-26 11:56:48 +00:00
Karl Heyes
b7fbcef133 revert previous patch, mike didn't want it...
svn path=/trunk/icecast/; revision=5866
2004-02-26 10:39:56 +00:00
Karl Heyes
450d448422 add missing lock on source tree
svn path=/trunk/icecast/; revision=5865
2004-02-25 21:43:52 +00:00
Karl Heyes
32f52c6211 send mp3 url metadata into a format specific routine
svn path=/trunk/icecast/; revision=5864
2004-02-25 20:23:07 +00:00
Karl Heyes
f6f31cdc24 *** empty log message ***
svn path=/trunk/icecast/; revision=5863
2004-02-25 20:11:31 +00:00
Karl Heyes
7371d0ab21 move the source client '200 OK' response to the source client specific part
of the source thread, and rearrange stats around that

svn path=/trunk/icecast/; revision=5862
2004-02-25 16:24:30 +00:00
Karl Heyes
dac1cf97dc small cleanup and don't shutdown curl too early
svn path=/trunk/icecast/; revision=5860
2004-02-24 21:02:44 +00:00
Karl Heyes
176804e436 Add accumulative stats back for source connections and don't hold locks
while writing responses back to the client.

svn path=/trunk/icecast/; revision=5853
2004-02-20 17:42:57 +00:00
Michael Smith
7b7a9f73d2 Oops. As oddsock says, this was broken, and didn't compile, and was unneccesary
anyway. reverted.

svn path=/trunk/icecast/; revision=5849
2004-02-20 02:09:00 +00:00
Michael Smith
92027f475b Patch for preventing stats from staying around too long - stats thread should
only go to sleep when it has nothing to do.

svn path=/trunk/icecast/; revision=5848
2004-02-20 01:25:28 +00:00
Karl Heyes
466a5cb60c Make source client connections reserve the source mountpoint and get rid
of the unused source setup code.

svn path=/trunk/icecast/; revision=5846
2004-02-19 21:16:59 +00:00
Karl Heyes
ae825afd3e Make the slave thread reserve relay mountpoints, and prevent reconnection
when a relay is currently active.

svn path=/trunk/icecast/; revision=5845
2004-02-19 20:28:21 +00:00
Karl Heyes
a83553ad8f functions to allow for reserving a source_t with a mountpoint
svn path=/trunk/icecast/; revision=5844
2004-02-19 16:32:26 +00:00
Karl Heyes
6d969934f5 Add checks for whether a source is active
svn path=/trunk/icecast/; revision=5843
2004-02-19 15:24:06 +00:00
Karl Heyes
ebf6603c07 small YP memory cleanup
svn path=/trunk/icecast/; revision=5842
2004-02-19 14:48:31 +00:00
Karl Heyes
66082000b4 minor cleanup
svn path=/trunk/icecast/; revision=5834
2004-02-17 15:46:05 +00:00
Karl Heyes
c3f0d43821 handle error condition at connection
svn path=/trunk/net/; revision=5833
2004-02-17 14:17:57 +00:00
Karl Heyes
2accfe55e5 fix possible bad pointer reference when finding fallback mount
svn path=/trunk/icecast/; revision=5830
2004-02-17 00:09:14 +00:00
Karl Heyes
012b3f4246 YP related cleanup, avoid bad pointer reference on HUP
svn path=/trunk/icecast/; revision=5829
2004-02-16 21:59:08 +00:00
Karl Heyes
5574d519c9 a few cleanups and a fix for async connects
svn path=/trunk/net/; revision=5821
2004-02-12 21:28:35 +00:00
Michael Smith
350c524cc8 I Hate String Handling In C.
svn path=/trunk/icecast/; revision=5818
2004-02-10 04:37:30 +00:00
Michael Smith
3d9d45c488 Another fix: the length of the _string_ is not the same as the metadata length
(the metadata is null-padded out to a multiple of 16 bytes), so we have to deal
with that.

svn path=/trunk/icecast/; revision=5817
2004-02-10 04:29:54 +00:00
Michael Smith
6128c0631c Oops. Fix null-terminator.
svn path=/trunk/icecast/; revision=5816
2004-02-10 04:20:43 +00:00
Michael Smith
7bc7ea581a Fire off stats event for metadata updates when we get metadata inline.
This fixes stats.xml listings for mp3 slave relays with metadata.
We get rid of 'metadata_raw', since we now have to format out that stuff anyway.

svn path=/trunk/icecast/; revision=5815
2004-02-10 03:50:39 +00:00
Karl Heyes
682753ea10 minor cleanup
svn path=/trunk/icecast/; revision=5809
2004-02-03 00:48:02 +00:00
Karl Heyes
aabbde37bc cleanup headers sent to listeners
svn path=/trunk/icecast/; revision=5808
2004-02-03 00:29:36 +00:00
Karl Heyes
b24028f620 recheck the relays after the HUP has been handled
svn path=/trunk/icecast/; revision=5807
2004-02-02 19:22:11 +00:00
oddsock
c95f2cea8d added win32 support to libshout
- new MSVC6 project files
- os.h with WIN32 specific typedefs
- fixed some casting issues which were causing precision errors on win32
- apparently select doesn't work with microsecond granularity so we will use Sleep() which does.

svn path=/trunk/timing/; revision=5796
2004-01-30 00:08:02 +00:00
Karl Heyes
d7dc5d327c minor cleanup
svn path=/trunk/icecast/; revision=5795
2004-01-29 23:23:53 +00:00
Karl Heyes
c90fb2ea55 cleanup duplicate work, fix rare but potential deadlock, and
fix silly bug introduced ealrier

svn path=/trunk/icecast/; revision=5794
2004-01-29 16:46:54 +00:00
Michael Smith
0aad6d849c Add Copyright notice to each source file, as requested by debian.
svn path=/trunk/httpp/; revision=5792
2004-01-29 01:02:12 +00:00
Karl Heyes
78ee74cf3e change thread startup/shutdown order slightly wrt to slave thread
svn path=/trunk/icecast/; revision=5791
2004-01-28 23:23:10 +00:00
Karl Heyes
c9d6c049ef oops, missed these from previous commit, the lock is now taken further up
svn path=/trunk/icecast/; revision=5789
2004-01-28 02:17:57 +00:00
Karl Heyes
87da84a021 make sure the source doesn't disappear from under us when an admin
request is performed.

svn path=/trunk/icecast/; revision=5788
2004-01-28 01:22:36 +00:00
Karl Heyes
6c6a22bf45 minor cleanups, and only have one thread responding to TERM
svn path=/trunk/avl/; revision=5787
2004-01-27 02:16:25 +00:00
Karl Heyes
1665a4f7d9 fix potential deadlock case at source stream startup
svn path=/trunk/icecast/; revision=5786
2004-01-26 22:42:22 +00:00
Karl Heyes
fbd92a913e add localtime_r checks, useful the threads
svn path=/trunk/icecast/; revision=5785
2004-01-26 21:49:07 +00:00
oddsock
610a2c022a fixed small bug where if using fallbacks and the main mount was not connected, icecast was not connecting client to the fallback mount.
svn path=/trunk/icecast/; revision=5780
2004-01-21 15:19:48 +00:00
Michael Smith
d668d4dfa6 Fix nasty bug in file serving code, would probably have made it fail with
multiple simultaneous requests.

svn path=/trunk/icecast/; revision=5764
2004-01-16 00:43:16 +00:00
oddsock
8a78baa149 - properly initialize the authorizer structure, otherwise by default it is enabled
- add new element (listenurl) to the stats for use in things like java player applets

svn path=/trunk/icecast/; revision=5763
2004-01-15 15:37:25 +00:00
oddsock
6dc92dae79 fixed some variable definitions to be ANSI compatable.
updated win32 project files with new files

svn path=/trunk/icecast/; revision=5761
2004-01-15 04:24:57 +00:00
Michael Smith
57dd5f71a5 Client authentication added.
Melanie's multilevel fallbacks added (after major changes).

svn path=/trunk/icecast/; revision=5760
2004-01-15 01:01:09 +00:00
oddsock
360c18b5b8 add option to display icecast version string, and cleaned up usage a bit..
svn path=/trunk/icecast/; revision=5720
2003-12-29 16:18:48 +00:00
Karl Heyes
e8546d44d4 Fetching the stream list was failing after the config file was re-read.
svn path=/trunk/icecast/; revision=5701
2003-12-17 23:03:38 +00:00
Karl Heyes
1e7316b4b2 failure case, keep the source count in sync with the number of sources
running, locking for shutdown was also affected.

svn path=/trunk/icecast/; revision=5700
2003-12-17 22:54:43 +00:00
oddsock
e8a61ce5d3 fixed master-slave relaying...
* slaves now ask for /admin/streamlist.txt which serves a plaintext version of the source list (this is what it was expecting to get)
* /admin/streamlist still serves XML (which slave.c wasn't expecting)
* fixed a few cases of pointer invalidation due to possible config re-reading.
* slave relay now uses relay password to get the list of streams to relay

svn path=/trunk/icecast/; revision=5695
2003-12-12 23:06:44 +00:00
oddsock
5e075b9202 Remove explicit exit() calls...this was possibly causing some cases of immediate UI termination without any messages...
svn path=/trunk/avl/; revision=5683
2003-12-04 16:27:30 +00:00
oddsock
c20bc3c346 Remove stats_callback() which is only used by the win32 UI...The stats gathering done by the UI has been completely rewritten to eliminate some reported instability.
svn path=/trunk/icecast/; revision=5682
2003-12-04 16:25:28 +00:00
oddsock
6a67e82db8 Added win32 include for getpid()
svn path=/trunk/icecast/; revision=5681
2003-12-04 16:24:34 +00:00
oddsock
70ae454647 get rid of the fullpath of the module that is logged...Stupid VC6....
svn path=/trunk/icecast/; revision=5680
2003-12-04 16:23:51 +00:00
Karl Heyes
25dcbd976d fix segv when fallback or dumpfilename are not specified
svn path=/trunk/icecast/; revision=5675
2003-12-02 01:11:12 +00:00
Karl Heyes
112ce96cf0 Add optional pidfile. Writes process id of icecast to named file
svn path=/trunk/icecast/; revision=5674
2003-12-01 23:30:13 +00:00
Karl Heyes
b795bb58dc cleanup bad pointer access after config re-read
svn path=/trunk/icecast/; revision=5673
2003-12-01 17:18:37 +00:00
oddsock
9a53ac6510 Icecast we are
svn path=/trunk/icecast/; revision=5629
2003-11-25 02:51:02 +00:00
oddsock
6671ab765d Base ICECAST2_VERSION_STRING off VERSION_STRING which is generated by autoconf..win32 projects will have to manually define this currently..blah.
svn path=/trunk/icecast/; revision=5628
2003-11-25 02:41:23 +00:00
oddsock
a3ab569ba1 lets make the ICECAST_VERSION_STRING a bit less of a maintance issue...
svn path=/trunk/icecast/; revision=5627
2003-11-22 22:23:04 +00:00
Karl Heyes
e3dbbbc81b if relay is for an mp3 stream, then get inline metadata by default if
possible

svn path=/trunk/icecast/; revision=5600
2003-11-18 00:59:51 +00:00
Karl Heyes
7ec7e90916 fix minor leak on config file read
svn path=/trunk/icecast/; revision=5599
2003-11-18 00:49:59 +00:00
Karl Heyes
cfc2695927 patch from mike, unlock logger on failure case.
svn path=/trunk/log/; revision=5597
2003-11-17 23:53:37 +00:00
oddsock
d525290195 added WIN32-ism
svn path=/trunk/icecast/; revision=5589
2003-11-17 22:38:58 +00:00
Karl Heyes
a093271f95 type warning cleanup
svn path=/trunk/icecast/; revision=5586
2003-11-17 21:36:03 +00:00
Karl Heyes
47f877569f While tracking down the bug which causes the zombie thread manager while
streaming mp3 with metadata, this patch has turned out to be successful at
maintaining a working icecast for the few users who have reported the problem

The patch essentially removes the use of the alloca and uses the malloc-type
calls instead.

svn path=/trunk/icecast/; revision=5562
2003-11-11 18:21:49 +00:00
oddsock
fe95280339 added bypassing of thread_sleep() in certain cases.
this came from KarlH.

svn path=/trunk/icecast/; revision=5526
2003-10-31 19:21:00 +00:00
oddsock
e554386ef0 proper cleanup of the rwlocks in the avl trees.
This was causing some major memory leakage on win32, but was not seen
on unix.  Icecast2 on win32 is leakfree again :)

svn path=/trunk/avl/; revision=5525
2003-10-31 19:18:42 +00:00
brendan
ff15b29177 typo
svn path=/trunk/timing/; revision=5492
2003-10-20 16:32:55 +00:00
brendan
2bfba7c60a Leigh Smith's MINGW32 compatibility patch, with modifications for better
autoconf feng shui

svn path=/trunk/m4/; revision=5490
2003-10-20 03:08:46 +00:00
Karl Heyes
4f41ecedb6 another compiler cleanup wrt 64bit int/pointer mismatches, thanks to
the ports maintainers

svn path=/trunk/avl/; revision=5182
2003-07-29 00:30:36 +00:00
Karl Heyes
571ced86d5 We need to state both of these to get the dependencies and linking working
as expected.

svn path=/trunk/icecast/; revision=5181
2003-07-27 22:53:58 +00:00
Karl Heyes
7e0894c0c9 Plug small memory leak when a thread exits.
Allow new threads to inherit scheduling policy.
Use long instead of int in thread_exit, thanks to the ports maintainers for
the heads up.

svn path=/trunk/thread/; revision=5179
2003-07-27 18:19:31 +00:00
Karl Heyes
39ad755a25 remove unwanted bits left in from previous commits
svn path=/trunk/icecast/; revision=5178
2003-07-27 01:13:06 +00:00
Karl Heyes
0c6493aa6d place the config reread flag in the global structure
svn path=/trunk/icecast/; revision=5175
2003-07-25 14:29:33 +00:00
Karl Heyes
9482db6016 avoid hitting the mutex's in the signal handler, we could block, which is
not something we want to do. Some mutex implementations are signal based.

svn path=/trunk/icecast/; revision=5174
2003-07-24 23:45:29 +00:00
Karl Heyes
69de4ea61e minor fixes. autoconf/make init clenaup, missing includes added and
compiler warnings removed

svn path=/trunk/icecast/; revision=5173
2003-07-24 16:21:22 +00:00
brendan
f14dcdc023 use _GNU_SOURCE where possible
guard unistd.h with CHROOT rather than HAVE_UNISTD_H, since that's how it's
tested in configure.in

svn path=/trunk/icecast/; revision=5171
2003-07-24 05:32:37 +00:00
brendan
a434767c34 Mike's #include patch
svn path=/trunk/icecast/; revision=5170
2003-07-24 05:24:00 +00:00
Karl Heyes
8654a18f72 minor cleanups
svn path=/trunk/icecast/; revision=5168
2003-07-23 00:27:10 +00:00
Karl Heyes
52b917d2c3 Make icecast use the shared M4 macros. Cleanup the other files.
svn path=/trunk/icecast/; revision=5157
2003-07-21 02:23:41 +00:00
Karl Heyes
43953202a2 refer to cfgfile.h instead of config.h for icecast.xml, and use config.h
for autoconf

svn path=/trunk/icecast/; revision=5156
2003-07-21 01:58:54 +00:00
Karl Heyes
88fd04cfd0 a move over from config.c config.h. This is so that config.h can be built
by autoconf.  config.h is also the name expected by the convenience libs

svn path=/trunk/icecast/; revision=5154
2003-07-21 01:39:39 +00:00
Karl Heyes
59f13c6f76 The xml cleanup occurs after this anyway, and doing this here can cause
bad things to occur when xslt gets used.

svn path=/trunk/icecast/; revision=5152
2003-07-18 19:54:02 +00:00
Karl Heyes
508d25641d avoid header namespace clashes
svn path=/trunk/icecast/; revision=5146
2003-07-16 19:41:59 +00:00
brendan
62ce258d46 Assign LGP to thread module
svn path=/trunk/thread/; revision=5138
2003-07-14 02:17:52 +00:00
brendan
12db251614 Assign LGPL to files (as implied by COPYING)
svn path=/trunk/net/; revision=5137
2003-07-14 02:14:59 +00:00
Karl Heyes
421df597fa Add log cycling on HUP signals. Currently reopens log files in append mode
so allows for continuing the log, or cycling just one log.   log filename
changes work as well.

svn path=/trunk/icecast/; revision=5129
2003-07-11 23:54:50 +00:00
Karl Heyes
d637781802 inverted logic used by some of the new functions fixed, locking updates
and some code cleanups

svn path=/trunk/log/; revision=5128
2003-07-11 23:36:49 +00:00
Karl Heyes
142c1b0609 don't terminate stream when debugging
svn path=/trunk/icecast/; revision=5127
2003-07-11 19:03:30 +00:00
Karl Heyes
d0e828a040 Modify logging framework for providing log cycling. By default the logging
is indefinite but here ices2 is capping the logs at around 2Meg, which is
currently fixed.

The renamed log filename is simple (xxx.old) but using a timestamp could
be implemented.  Explicit log re-opening (eg HUP handling) is implemented
but not currently used.

svn path=/trunk/log/; revision=5107
2003-07-09 02:45:22 +00:00
oddsock
78e3977e2d unused variable
svn path=/trunk/icecast/; revision=5104
2003-07-08 14:11:32 +00:00
oddsock
d5b71bce49 don't overwrite info in one yp with info from another :)
svn path=/trunk/icecast/; revision=5103
2003-07-08 14:11:01 +00:00
oddsock
c6caf7f19c more portable va_copy for win32
svn path=/trunk/net/; revision=5098
2003-07-08 02:39:33 +00:00
oddsock
b1cd3085f2 cleaned a bit
svn path=/trunk/icecast/; revision=5094
2003-07-07 22:04:29 +00:00
oddsock
8ce77fc778 win32 goodies
svn path=/trunk/icecast/; revision=5093
2003-07-07 22:02:39 +00:00
brendan
729d65ae52 va_copy is undefined on windows
svn path=/trunk/net/; revision=5092
2003-07-07 21:33:58 +00:00
brendan
ff09d9eaa9 The last of the convenience lib cleanups. A little forethought in designing
a keyboard macro made this one a lot easier.

svn path=/trunk/thread/; revision=5090
2003-07-07 20:38:34 +00:00
brendan
5685b9a866 MAX may be defined elsewhere
svn path=/trunk/avl/; revision=5086
2003-07-07 03:37:23 +00:00
brendan
fd289cfe4d httpp goes through the rinse cycle
svn path=/trunk/httpp/; revision=5085
2003-07-07 01:49:27 +00:00
brendan
1af405ee9c I missed a spot. And another one.
svn path=/trunk/avl/; revision=5084
2003-07-07 01:40:08 +00:00
brendan
8278b004fe net gets the namespace deep cleansing treatment.
I suspect all this may be unnecessary, only because I've never heard of this
before. But then, I don't do much library work, and better safe than sorry.

svn path=/trunk/net/; revision=5083
2003-07-07 01:32:42 +00:00
brendan
3833c824ae Namespace cleanup: _mangle exported symbols, declare others static.
This is tedious.

svn path=/trunk/avl/; revision=5082
2003-07-07 01:10:14 +00:00
brendan
cbfb283e6f Move MP3 headers back into format_mp3.c per Mike's desire.
I removed icy- support from the generic send headers function, as it is my
understanding that only MP3 sources use icy headers. PLEASE correct me
if I am wrong.

I also added code in the mp3 function to convert ice-audio-info bitrate to
an icy-br header. ice-audio-info is for YP, icy-br for clients. Perhaps we
should send both to clients though?

svn path=/trunk/icecast/; revision=5079
2003-07-06 15:27:50 +00:00
brendan
004152cf7a Write a newline after the m3u entry (patch by Paul Bryan).
svn path=/trunk/icecast/; revision=5067
2003-07-05 06:36:16 +00:00
giles
a2400995a0 Add a name mangling mechanism so we can safely compile in code we share with applications that might link with use. Currently only hooked up for the timing liblet, but thread is the real target.
Basically we define _mangle() in config.h, and use that in timing.h (if available) to prepend the package name to all the symbols in the header and including C files. It's thus fairly invisible.

Unfortunately the prefix is hardwired, so it's another thing that has to be maintained by hand (not that is changes often, but we can't make it a macro). AH_VERBATIM seems to be the only way to add a macro that takes arguments, and it explicitly doesn't do shell expansion. Further, @PACKAGE@ substitution doesn't happen on config.h.in. Insert standard autotools frustration here.

svn path=/trunk/timing/; revision=5060
2003-07-04 23:18:26 +00:00
brendan
7c40c8ae92 Get everthing in make dist, and remove bitkeeper cruft
svn path=/trunk/avl/; revision=5050
2003-07-03 12:59:06 +00:00
brendan
e21a3fc19e Convert ice headers to icy headers for MP3 streams.
TODO: rewrite ice-audio-info bitrate tag to icy-br.

svn path=/trunk/icecast/; revision=5045
2003-07-03 01:39:59 +00:00
brendan
205d225b73 When relaying MP3 we reported the source metainterval as well as our own,
causing stuttering in some clients. Thank goodness icecast uses an
odd metainterval, or this bug would never have been discoverd :)

svn path=/trunk/icecast/; revision=5044
2003-07-03 01:36:06 +00:00
Karl Heyes
f6efb106de this was never used and it's handled elsewhere anyway
svn path=/trunk/net/; revision=5042
2003-07-02 21:29:08 +00:00
brendan
26e3be189a finish what we started re: resolver
svn path=/trunk/net/; revision=5026
2003-07-01 18:49:07 +00:00
Karl Heyes
7fda8c6afb infinite loop/memory leak fix for private streams when yp is enabled
svn path=/trunk/icecast/; revision=5019
2003-06-29 18:12:09 +00:00
oddsock
4b92ae2baa - add_yp_info moved into yp.c
- all yp adds/touches are now done within a single thread.
  This should eliminate any "thread growth" issues and make
  things behave much nicer when yp problems arise.  We should
  eventually change the add/touches to non-blocking sockets,
  which will be needed for large numbers of streams doing adds/touches.

svn path=/trunk/icecast/; revision=5012
2003-06-26 13:33:55 +00:00
oddsock
abb6cddbf0 - added startup of yp add/touch thread
svn path=/trunk/icecast/; revision=5011
2003-06-26 13:33:15 +00:00
oddsock
fb9292658b - fixed small memory leak
svn path=/trunk/icecast/; revision=5010
2003-06-26 13:32:34 +00:00
oddsock
303c11197f - moved add_yp_info into yp.c
- most of the yp processing now moved into the yp add/touch thread
- use ice/icy-public rather than ice/icy-private to coorespond to libshout and general convention
- memory leak fixed with audio-info

svn path=/trunk/icecast/; revision=5009
2003-06-26 13:32:04 +00:00
oddsock
dd6af7e848 - force touches when vorbis metadata changes
svn path=/trunk/icecast/; revision=5008
2003-06-26 13:31:38 +00:00
oddsock
428c1f1f36 - force touches when mp3 metadata is updated via admin interface
svn path=/trunk/icecast/; revision=5007
2003-06-26 13:31:17 +00:00
Karl Heyes
f2e1bc2419 handle error returned from listening sockets, can cause busy looping
svn path=/trunk/icecast/; revision=4986
2003-06-20 18:50:24 +00:00
Karl Heyes
ea2dc4a67f ermmm, let's use the right operator.
svn path=/trunk/httpp/; revision=4963
2003-06-18 15:52:25 +00:00
Karl Heyes
032ad5d9ff minor cleanup, removes compiler warning, makes it static, and doesn't
re-evaluate string length each time.

svn path=/trunk/httpp/; revision=4961
2003-06-18 11:13:11 +00:00
Karl Heyes
a4d20515f1 remove file descriptor leak when IPv6 is being used.
svn path=/trunk/net/; revision=4960
2003-06-18 11:05:49 +00:00
brendan
e49e587c01 gcc 3.3 warns: dereferencing type-punned pointer will break strict-aliasing rules
svn path=/trunk/httpp/; revision=4906
2003-06-09 22:30:09 +00:00
Karl Heyes
b41664426c Lets put this in the right place.
svn path=/trunk/net/; revision=4889
2003-06-06 11:19:50 +00:00
Karl Heyes
b4cdad000d Another net change, making it more bullet-proof, before could silently miss
data. so now we allocate enough space for the write to succeed fully.

svn path=/trunk/icecast/; revision=4888
2003-06-06 00:05:19 +00:00
brendan
57f344b1e3 whoops
svn path=/trunk/net/; revision=4887
2003-06-05 19:18:00 +00:00
brendan
7fce0b586b Karl's sys/select.h patch for fbsd. It must be under another std include on
OS X for some reason.

svn path=/trunk/net/; revision=4886
2003-06-05 19:02:36 +00:00
brendan
6431c0c6a9 Karl's patch for freebsd, minus the sys/select.h test which breaks on OS X.
Also enables IPV6 in libshout!

svn path=/trunk/httpp/; revision=4884
2003-06-05 17:09:12 +00:00
oddsock
a8d602fe33 fixed check for regular file type in win32-specific code
svn path=/trunk/icecast/; revision=4879
2003-06-05 04:15:58 +00:00
brendan
47cef92fcc Karl's patch for a namespace collision he reports on some BSD systems.
svn path=/trunk/net/; revision=4861
2003-06-03 18:29:23 +00:00
Michael Smith
9e8e9a5024 Fix some function comments, sock_write_string() and sock_write may NOT be
called with a non-blocking socket

svn path=/trunk/net/; revision=4845
2003-05-29 12:18:04 +00:00
brendan
494f8fc2b6 Fix curl version test.
YP is enabled by default but automatically turned off if the curl test fails
(unless --enable-yp is explicitly passed to configure, in which case configure
will fail if the curl test fails).

svn path=/trunk/icecast/; revision=4831
2003-05-28 15:04:53 +00:00
Michael Smith
018d0a2700 Fix lots of warnings in new admin stuff - primarily wrong types in printf
format strings.

svn path=/trunk/icecast/; revision=4830
2003-05-28 13:43:48 +00:00
oddsock
8f84c0188a some win32-isms
and a bad free that valgrind yelled at me about

svn path=/trunk/icecast/; revision=4711
2003-05-15 23:19:57 +00:00
oddsock
27c0af2b1d infrastructure for new web-based admin interface
new config option <adminroot>

restructured code a bit in admin.c for a bit better extendability

svn path=/trunk/icecast/; revision=4708
2003-05-15 21:03:32 +00:00
Michael Smith
8527ed7b43 Implementation of aliases contributed by Paul Donohue <icecast@TopQuark.net>
svn path=/trunk/icecast/; revision=4629
2003-04-23 12:44:29 +00:00