[xiph-commits] r9433 - in icecast/branches/kh/icecast: conf doc src
karl at motherfish-iii.xiph.org
karl at motherfish-iii.xiph.org
Fri Jun 10 06:22:14 PDT 2005
Author: karl
Date: 2005-06-10 06:22:06 -0700 (Fri, 10 Jun 2005)
New Revision: 9433
Modified:
icecast/branches/kh/icecast/conf/icecast.xml.in
icecast/branches/kh/icecast/doc/icecast2_config_file.html
icecast/branches/kh/icecast/src/cfgfile.c
icecast/branches/kh/icecast/src/format.c
icecast/branches/kh/icecast/src/slave.c
icecast/branches/kh/icecast/src/source.c
Log:
sync up work from recent merging
Modified: icecast/branches/kh/icecast/conf/icecast.xml.in
===================================================================
--- icecast/branches/kh/icecast/conf/icecast.xml.in 2005-06-10 10:18:41 UTC (rev 9432)
+++ icecast/branches/kh/icecast/conf/icecast.xml.in 2005-06-10 13:22:06 UTC (rev 9433)
@@ -3,12 +3,10 @@
<clients>100</clients>
<sources>2</sources>
<threadpool>5</threadpool>
- <queue-size>102400</queue-size>
+ <queue-size>524288</queue-size>
<client-timeout>30</client-timeout>
<header-timeout>15</header-timeout>
<source-timeout>10</source-timeout>
- <!-- for compatability with trunk -->
- <burst-on-connect>1</burst-on-connect>
<!-- same as burst-on-connect, but this allows for being more
specific on how much to burst. Most people won't need to
change from the default 64k. Applies to all mountpoints -->
@@ -58,13 +56,18 @@
</listen-socket>
-->
- <!--<relays-on-demand>1</relays-on-demand>-->
<!--<master-server>127.0.0.1</master-server>-->
<!--<master-server-port>8001</master-server-port>-->
<!--<master-update-interval>120</master-update-interval>-->
<!--<master-password>hackme</master-password>-->
<!--<master-relay-auth>1</master-relay-auth>-->
+ <!-- setting this makes all relays on-demand unless overridden, this is
+ useful for master relays which do not have <relay> definitions here.
+ The default is 0 -->
+ <!--<relays-on-demand>1</relays-on-demand>-->
+
+
<!-- Report <hostname> and this port to master server for redirecting
clients to this slave -->
<!--<master-redirect-port>8000</master-redirect-port>-->
@@ -99,13 +102,14 @@
<fallback-mount>/example2.ogg</fallback-mount>
<fallback-override>1</fallback-override>
<fallback-when-full>1</fallback-when-full>
+ <intro>/path/to/stream-intro.ogg</intro>
<hidden>1</hidden>
- <intro>/path/to/stream-intro.ogg</intro>
- <no-yp>1</no-yp>
<authentication type="htpasswd">
<option name="filename" value="myauth"/>
<option name="allow_duplicate_users" value="0"/>
</authentication>
+ <on-connect>/home/icecast/bin/stream-start</on-connect>
+ <on-disconnect>/home/icecast/bin/stream-stop</on-disconnect>
</mount>
-->
<!-- other auth possibilities include running a command
Modified: icecast/branches/kh/icecast/doc/icecast2_config_file.html
===================================================================
--- icecast/branches/kh/icecast/doc/icecast2_config_file.html 2005-06-10 10:18:41 UTC (rev 9432)
+++ icecast/branches/kh/icecast/doc/icecast2_config_file.html 2005-06-10 13:22:06 UTC (rev 9433)
@@ -550,14 +550,14 @@
</div>
<h4>on-connect</h4>
<div class="indentedbox">
- <p>State a program that is run when the source is started. It is passed parameter which
+ <p>State a program that is run when the source is started. It is passed a parameter which
is the name of the mountpoint that is starting. The processing of the stream does not wait
for the script to end. This option is not available on win32
</p>
</div>
<h4>on-disconnect</h4>
<div class="indentedbox">
- <p>State a program that is run when the source ends. It is passed parameter which is the
+ <p>State a program that is run when the source ends. It is passed a parameter which is the
name of the mountpoint that has ended. The processing of the stream does not wait for the
script to end. This option is not available on win32
</p>
Modified: icecast/branches/kh/icecast/src/cfgfile.c
===================================================================
--- icecast/branches/kh/icecast/src/cfgfile.c 2005-06-10 10:18:41 UTC (rev 9432)
+++ icecast/branches/kh/icecast/src/cfgfile.c 2005-06-10 13:22:06 UTC (rev 9433)
@@ -31,7 +31,7 @@
#define CONFIG_DEFAULT_ADMIN "icemaster at localhost"
#define CONFIG_DEFAULT_CLIENT_LIMIT 256
#define CONFIG_DEFAULT_SOURCE_LIMIT 16
-#define CONFIG_DEFAULT_QUEUE_SIZE_LIMIT (100*1024)
+#define CONFIG_DEFAULT_QUEUE_SIZE_LIMIT (500*1024)
#define CONFIG_DEFAULT_BURST_SIZE (64*1024)
#define CONFIG_DEFAULT_THREADPOOL_SIZE 4
#define CONFIG_DEFAULT_CLIENT_TIMEOUT 30
Modified: icecast/branches/kh/icecast/src/format.c
===================================================================
--- icecast/branches/kh/icecast/src/format.c 2005-06-10 10:18:41 UTC (rev 9432)
+++ icecast/branches/kh/icecast/src/format.c 2005-06-10 13:22:06 UTC (rev 9433)
@@ -159,9 +159,9 @@
if (refbuf == NULL)
{
+ /* client refers to no data, must be from a move */
if (source->client->con)
{
- client->intro_offset = -1;
find_client_start (source, client);
return -1;
}
@@ -183,7 +183,6 @@
if (source->stream_data_tail)
{
/* better find the right place in queue for this client */
- client->intro_offset = -1;
client_set_queue (client, NULL);
find_client_start (source, client);
}
Modified: icecast/branches/kh/icecast/src/slave.c
===================================================================
--- icecast/branches/kh/icecast/src/slave.c 2005-06-10 10:18:41 UTC (rev 9432)
+++ icecast/branches/kh/icecast/src/slave.c 2005-06-10 13:22:06 UTC (rev 9433)
@@ -311,7 +311,6 @@
break;
}
stats_event_inc(NULL, "source_relay_connections");
- stats_event (relay->localmount, "listeners", "0");
stats_event (relay->localmount, "source_ip", relay->server);
source_main (relay->source);
Modified: icecast/branches/kh/icecast/src/source.c
===================================================================
--- icecast/branches/kh/icecast/src/source.c 2005-06-10 10:18:41 UTC (rev 9432)
+++ icecast/branches/kh/icecast/src/source.c 2005-06-10 13:22:06 UTC (rev 9433)
@@ -356,6 +356,8 @@
{
client_set_queue (client, NULL);
client->check_buffer = format_check_file_buffer;
+ if (source->client->con == NULL)
+ client->intro_offset = -1;
}
client->next = dest->active_clients;
@@ -661,7 +663,6 @@
thread_rwlock_rlock (source->shutdown_rwlock);
/* start off the statistics */
- source->listeners = 0;
stats_event_inc (NULL, "sources");
stats_event_inc (NULL, "source_total_connections");
stats_event (source->mount, "slow_listeners", "0");
@@ -838,8 +839,6 @@
int source_free_client (source_t *source, client_t *client)
{
- client_set_queue (client, NULL);
-
/* if no response has been sent then send a 404 */
if (client->respcode == 0)
client_send_404 (client, "Mount unavailable");
@@ -1167,11 +1166,11 @@
void *source_client_thread (void *arg)
{
source_t *source = arg;
- const char ok_msg[] = "HTTP/1.0 200 OK\r\n\r\n";
- int bytes = sizeof (ok_msg)-1;
if (source->client && source->client->con)
{
+ const char ok_msg[] = "HTTP/1.0 200 OK\r\n\r\n";
+ int bytes ;
const char *agent;
source->client->respcode = 200;
More information about the commits
mailing list