1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-10-27 05:10:11 -04:00
Commit Graph

477 Commits

Author SHA1 Message Date
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