[xiph-commits] r9770 - in icecast/branches/kh/icecast: . doc src web

karl at svn.xiph.org karl at svn.xiph.org
Wed Aug 17 18:17:44 PDT 2005


Author: karl
Date: 2005-08-17 18:17:30 -0700 (Wed, 17 Aug 2005)
New Revision: 9770

Modified:
   icecast/branches/kh/icecast/configure.in
   icecast/branches/kh/icecast/doc/icecast2_basicsetup.html
   icecast/branches/kh/icecast/doc/icecast2_config_file.html
   icecast/branches/kh/icecast/doc/icecast2_faq.html
   icecast/branches/kh/icecast/doc/icecast2_glossary.html
   icecast/branches/kh/icecast/doc/icecast2_introduction.html
   icecast/branches/kh/icecast/doc/icecast2_listenerauth.html
   icecast/branches/kh/icecast/doc/icecast2_relay.html
   icecast/branches/kh/icecast/doc/icecast2_stats.html
   icecast/branches/kh/icecast/doc/icecast2_win32.html
   icecast/branches/kh/icecast/doc/icecast2_yp.html
   icecast/branches/kh/icecast/doc/index.html
   icecast/branches/kh/icecast/doc/index_win32.html
   icecast/branches/kh/icecast/doc/win32_section1.html
   icecast/branches/kh/icecast/doc/win32_section2.html
   icecast/branches/kh/icecast/doc/win32_section3.html
   icecast/branches/kh/icecast/src/auth_url.c
   icecast/branches/kh/icecast/src/event.c
   icecast/branches/kh/icecast/src/logging.c
   icecast/branches/kh/icecast/src/logging.h
   icecast/branches/kh/icecast/src/main.c
   icecast/branches/kh/icecast/src/xslt.c
   icecast/branches/kh/icecast/web/status.xsl
Log:
merge changes made on trunk. various small doc updates, redirecting of
xml/xslt errors to error log, pidfile creation change, -b closing terminal
fds, and auth_url option/action name consistency cleanup


Modified: icecast/branches/kh/icecast/configure.in
===================================================================
--- icecast/branches/kh/icecast/configure.in	2005-08-18 01:10:43 UTC (rev 9769)
+++ icecast/branches/kh/icecast/configure.in	2005-08-18 01:17:30 UTC (rev 9770)
@@ -113,7 +113,7 @@
         enable_curl="yes"
         XIPH_VAR_APPEND([XIPH_CPPFLAGS],[$CURL_CFLAGS])
         XIPH_VAR_PREPEND([XIPH_LIBS],[$CURL_LIBS])
-        ], [ AC_MSG_NOTICE([Your curl dev files are too old (7.10 or above required), YP disabled])
+        ], [ AC_MSG_NOTICE([Your curl dev files are too old (7.10 or above required)])
         ], [#include <curl/curl.h>
         ])
     ],[ AC_MSG_NOTICE([libcurl not found])

Modified: icecast/branches/kh/icecast/doc/icecast2_basicsetup.html
===================================================================
--- icecast/branches/kh/icecast/doc/icecast2_basicsetup.html	2005-08-18 01:10:43 UTC (rev 9769)
+++ icecast/branches/kh/icecast/doc/icecast2_basicsetup.html	2005-08-18 01:17:30 UTC (rev 9770)
@@ -2,7 +2,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
 <head>
-<title>Icecast v2.0 Documentation</title>
+<title>Icecast v2.x Documentation</title>
 <link rel="stylesheet" type="text/css" href="style.css" />
 </head>
 <body>
@@ -49,10 +49,15 @@
 <pre>
 icecast -c /path/to/icecast.xml
 </pre>
-<p>If no error messages are generated, then check the error.log file for the following message :</p>
+<p>If no error messages are generated, then check the error.log file for the 'server started'
+message, it will look something like :-</p>
 <pre>
-[2003-10-31  13:04:49] INFO main/main.c icecast server started
+[2003-10-31  13:04:49] INFO main/main.c Icecast 2.3.0 server started
 </pre>
+<p>You may notice slight variations to the line above, the time will no doubt be different,
+and on some platforms the main.c is just main, but the key thing here is that the server is
+started, logging is working and the version is shown.
+</p>
 <p>You can also verify that it started by visiting the following URL : http://yourip:port/admin/stats.xml.  You should be prompted for a username and password.  Enter the username "admin" and the password you entered for &lt;admin-password&gt;.  If all is well, you should see an small XML tree which represents icecast statistics (more about that later).</p>
 <p>Now that the icecast server is started you must now configure your source client.  The information you will need for the source client is the following : <br />
 <br />

Modified: icecast/branches/kh/icecast/doc/icecast2_config_file.html
===================================================================
--- icecast/branches/kh/icecast/doc/icecast2_config_file.html	2005-08-18 01:10:43 UTC (rev 9769)
+++ icecast/branches/kh/icecast/doc/icecast2_config_file.html	2005-08-18 01:17:30 UTC (rev 9770)
@@ -2,7 +2,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
 <head>
-<title>Icecast v2.0 Documentation</title>
+<title>Icecast v2.x Documentation</title>
 <link rel="stylesheet" type="text/css" href="style.css" />
 </head>
 <body>
@@ -173,7 +173,11 @@
     &lt;fileserve&gt;1&lt;/fileserve&gt;
     &lt;shoutcast-mount&gt;/live.nsv&lt;/shoutcast-mount&gt;
 </pre>
-<p>This section contains miscellaneous server settings.  Note that multiple listen-socket sections may be configured in order to have icecast2 listen on multiple network interfaces.  If a bind-address is not specified for a particular listen-socket, then the socket will be bound to all interfaces. Generally, you won't need to set bind-address.
+<p>This section contains miscellaneous server settings.  Note that multiple listen-socket
+sections may be configured in order to have icecast2 listen on multiple network interfaces.
+If a bind-address is not specified for a particular listen-socket, then the socket will be
+bound to all interfaces. Generally, you won't need to set bind-address. There is an internal
+limit of 20 listening sockets currently, which may be extended in later releases.
 </p>
 <h4>port</h4>
 <div class="indentedbox">

Modified: icecast/branches/kh/icecast/doc/icecast2_faq.html
===================================================================
--- icecast/branches/kh/icecast/doc/icecast2_faq.html	2005-08-18 01:10:43 UTC (rev 9769)
+++ icecast/branches/kh/icecast/doc/icecast2_faq.html	2005-08-18 01:17:30 UTC (rev 9770)
@@ -2,7 +2,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
 <head>
-<title>Icecast v2.0 Documentation</title>
+<title>Icecast v2.x Documentation</title>
 <link rel="stylesheet" type="text/css" href="style.css" />
 </head>
 <body>

Modified: icecast/branches/kh/icecast/doc/icecast2_glossary.html
===================================================================
--- icecast/branches/kh/icecast/doc/icecast2_glossary.html	2005-08-18 01:10:43 UTC (rev 9769)
+++ icecast/branches/kh/icecast/doc/icecast2_glossary.html	2005-08-18 01:17:30 UTC (rev 9770)
@@ -2,7 +2,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
 <head>
-<title>Icecast v2.0 Documentation</title>
+<title>Icecast v2.x Documentation</title>
 <link rel="stylesheet" type="text/css" href="style.css" />
 </head>
 <body>

Modified: icecast/branches/kh/icecast/doc/icecast2_introduction.html
===================================================================
--- icecast/branches/kh/icecast/doc/icecast2_introduction.html	2005-08-18 01:10:43 UTC (rev 9769)
+++ icecast/branches/kh/icecast/doc/icecast2_introduction.html	2005-08-18 01:17:30 UTC (rev 9770)
@@ -2,7 +2,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
 <head>
-<title>Icecast v2.0 Documentation</title>
+<title>Icecast v2.x Documentation</title>
 <link rel="stylesheet" type="text/css" href="style.css" />
 </head>
 <body>

Modified: icecast/branches/kh/icecast/doc/icecast2_listenerauth.html
===================================================================
--- icecast/branches/kh/icecast/doc/icecast2_listenerauth.html	2005-08-18 01:10:43 UTC (rev 9769)
+++ icecast/branches/kh/icecast/doc/icecast2_listenerauth.html	2005-08-18 01:17:30 UTC (rev 9770)
@@ -2,7 +2,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
 <head>
-<title>Icecast v2.2 Documentation</title>
+<title>Icecast v2.x Documentation</title>
 <link rel="stylesheet" type="text/css" href="style.css" />
 </head>
 <body>
@@ -27,6 +27,10 @@
     <li>HTPASSWD - lookup a named file for a matching username and password</li>
     <li>URL - issue web requests (eg PHP) to match authentication</li>
 </ul>
+<p>The listener authentication within a specified mount in the icecast XML configuration
+can apply to either to a stream from a source client, relay or a webroot based file. They
+do apply to intro files or fallback streams.
+</p>
 <br />
 <h2>HTPASSWD Listener Authentication</h2>
 <p>In order to use listener authentication, you MUST configure a mount specific option.  This means that you have to provide a &lt;mount&gt; section in the main icecast config file.  The following is an example :</p>
@@ -88,38 +92,38 @@
             &lt;option name="username" value="user"/&gt;
             &lt;option name="password" value="pass"/&gt;
             &lt;option name="auth_header" value="icecast-auth-user: 1"/&gt;
-            &lt;option name="timelimit-header" value="icecast-auth-timelimit:"/&gt;
+            &lt;option name="timelimit_header" value="icecast-auth-timelimit:"/&gt;
         &lt;/authentication&gt;
     &lt;/mount&gt;
 </pre>
 <p>The options are described below in more detail, each of which is optional, but in each
 case, within the POST data, the value for each setting is encoded.</p>
-<h3>start</h3>
+<h3>mount_add</h3>
 <p>This URL is for informing the auth server of a stream starting. No listener information
 is passed for this, but can be used to initialise any details the auth server may have.
 </p>
 <p>POST details are</p>
 <pre>
-    action=start&amp;mount=/live&amp;server=myserver.com&amp;port=8000
+    action=mount_add&amp;mount=/live&amp;server=myserver.com&amp;port=8000
 </pre>
 <p>Here the details indicate the server name (&lt;hostname&gt;) and mountpoint starting up</p>
-<h3>end</h3>
+<h3>mount_remove</h3>
 <p>This URL is for informing the auth server of a stream finishing, like the start option, no
 listener details are passed.</p>
 <p>POST details are</p>
 <pre>
-    action=end&amp;mount=/live&amp;server=myserver.com&amp;port=8000
+    action=mount_remove&amp;mount=/live&amp;server=myserver.com&amp;port=8000
 </pre>
 <p>like the start option, server name and mountpoint are provided</p>
 </p>
-<h3>add</h3>
+<h3>listener_add</h3>
 <p>This is most likely to be used if anything. When a listener connects, before anything is
 sent back to them, this request is processed.  The default action is to reject a listener
 unless the auth server sends back a response header which may be stated in the 'header' option
 </p>
 <p>POST details are</p>
 <pre>
-    action=auth&amp;server=myserver.com&amp;port=8000&amp;client=1&amp;mount=/live&amp;user=&amp;pass=&amp;ip=127.0.0.1&amp;agent="My%20player"
+    action=listener_add&amp;server=myserver.com&amp;port=8000&amp;client=1&amp;mount=/live&amp;user=&amp;pass=&amp;ip=127.0.0.1&amp;agent="My%20player"
 </pre>
 <p>There are more details with this, client is the unique ID for the client within icecast,
 user and pass may be blank but come from the HTTP basic auth that the listener states, ip
@@ -128,11 +132,11 @@
 query parameters, so for instance the requested URL can be /stream.ogg&amp;session=xyz, but
 note that each option data is escaped before being passed via POST
 </p>
-<h3>remove</h3>
+<h3>listener_remove</h3>
 <p>This URL is for when a listener connection closes.</p>
 <p>POST details are</p>
 <pre>
-    action=remove&amp;server=myserver.com&amp;port=8000&amp;client=1&amp;mount=/live&amp;user=&amp;pass=&amp;duration=3600
+    action=listener_remove&amp;server=myserver.com&amp;port=8000&amp;client=1&amp;mount=/live&amp;user=&amp;pass=&amp;duration=3600
 </pre>
 <p>Again this is similar to the add option, the difference being that a duration is passed
 reflecting the number of seconds the listener was connected for </p>
@@ -142,7 +146,7 @@
 <pre>icecast-auth-user: 1</pre>
 but it could can anything you like, for instance
 <pre>HTTP 200 OK</pre>
-<h3>timelimit-header</h3>
+<h3>timelimit_header</h3>
 <p>Listeners could have a time limit imposed on them, and if this header is sent back with a
 figure (which represents seconds) then that is how long the client will remain connected for.
 </p>

Modified: icecast/branches/kh/icecast/doc/icecast2_relay.html
===================================================================
--- icecast/branches/kh/icecast/doc/icecast2_relay.html	2005-08-18 01:10:43 UTC (rev 9769)
+++ icecast/branches/kh/icecast/doc/icecast2_relay.html	2005-08-18 01:17:30 UTC (rev 9770)
@@ -2,7 +2,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
 <head>
-<title>Icecast v2.0 Documentation</title>
+<title>Icecast v2.x Documentation</title>
 <link rel="stylesheet" type="text/css" href="style.css" />
 </head>
 <body>

Modified: icecast/branches/kh/icecast/doc/icecast2_stats.html
===================================================================
--- icecast/branches/kh/icecast/doc/icecast2_stats.html	2005-08-18 01:10:43 UTC (rev 9769)
+++ icecast/branches/kh/icecast/doc/icecast2_stats.html	2005-08-18 01:17:30 UTC (rev 9770)
@@ -2,7 +2,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
 <head>
-<title>Icecast v2.0 Documentation</title>
+<title>Icecast v2.x Documentation</title>
 <link rel="stylesheet" type="text/css" href="style.css" />
 </head>
 <body>

Modified: icecast/branches/kh/icecast/doc/icecast2_win32.html
===================================================================
--- icecast/branches/kh/icecast/doc/icecast2_win32.html	2005-08-18 01:10:43 UTC (rev 9769)
+++ icecast/branches/kh/icecast/doc/icecast2_win32.html	2005-08-18 01:17:30 UTC (rev 9770)
@@ -2,7 +2,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
 <head>
-<title>Icecast v2.0 Documentation</title>
+<title>Icecast v2.x Documentation</title>
 <link rel="stylesheet" type="text/css" href="style.css" />
 </head>
 <body>

Modified: icecast/branches/kh/icecast/doc/icecast2_yp.html
===================================================================
--- icecast/branches/kh/icecast/doc/icecast2_yp.html	2005-08-18 01:10:43 UTC (rev 9769)
+++ icecast/branches/kh/icecast/doc/icecast2_yp.html	2005-08-18 01:17:30 UTC (rev 9770)
@@ -2,7 +2,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
 <head>
-<title>Icecast v2.0 Documentation</title>
+<title>Icecast v2.x Documentation</title>
 <link rel="stylesheet" type="text/css" href="style.css" />
 </head>
 <body>

Modified: icecast/branches/kh/icecast/doc/index.html
===================================================================
--- icecast/branches/kh/icecast/doc/index.html	2005-08-18 01:10:43 UTC (rev 9769)
+++ icecast/branches/kh/icecast/doc/index.html	2005-08-18 01:17:30 UTC (rev 9770)
@@ -2,7 +2,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
 <head>
-<title>Icecast v2.0 Documentation</title>
+<title>Icecast v2.x Documentation</title>
 <link rel="stylesheet" type="text/css" href="style.css" />
 </head>
 <body>

Modified: icecast/branches/kh/icecast/doc/index_win32.html
===================================================================
--- icecast/branches/kh/icecast/doc/index_win32.html	2005-08-18 01:10:43 UTC (rev 9769)
+++ icecast/branches/kh/icecast/doc/index_win32.html	2005-08-18 01:17:30 UTC (rev 9770)
@@ -2,7 +2,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
 <head>
-<title>Icecast v2.0 Documentation Win32</title>
+<title>Icecast v2.x Documentation Win32</title>
 <link rel="stylesheet" type="text/css" href="style.css" />
 </head>
 <body>

Modified: icecast/branches/kh/icecast/doc/win32_section1.html
===================================================================
--- icecast/branches/kh/icecast/doc/win32_section1.html	2005-08-18 01:10:43 UTC (rev 9769)
+++ icecast/branches/kh/icecast/doc/win32_section1.html	2005-08-18 01:17:30 UTC (rev 9770)
@@ -2,7 +2,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
 <head>
-<title>Icecast v2.0 Documentation</title>
+<title>Icecast v2.x Documentation</title>
 <link rel="stylesheet" type="text/css" href="style.css" />
 </head>
 <body>

Modified: icecast/branches/kh/icecast/doc/win32_section2.html
===================================================================
--- icecast/branches/kh/icecast/doc/win32_section2.html	2005-08-18 01:10:43 UTC (rev 9769)
+++ icecast/branches/kh/icecast/doc/win32_section2.html	2005-08-18 01:17:30 UTC (rev 9770)
@@ -2,7 +2,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
 <head>
-<title>Icecast v2.0 Documentation</title>
+<title>Icecast v2.x Documentation</title>
 <link rel="stylesheet" type="text/css" href="style.css" />
 </head>
 <body>

Modified: icecast/branches/kh/icecast/doc/win32_section3.html
===================================================================
--- icecast/branches/kh/icecast/doc/win32_section3.html	2005-08-18 01:10:43 UTC (rev 9769)
+++ icecast/branches/kh/icecast/doc/win32_section3.html	2005-08-18 01:17:30 UTC (rev 9770)
@@ -2,7 +2,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
 <head>
-<title>Icecast v2.0 Documentation</title>
+<title>Icecast v2.x Documentation</title>
 <link rel="stylesheet" type="text/css" href="style.css" />
 </head>
 <body>

Modified: icecast/branches/kh/icecast/src/auth_url.c
===================================================================
--- icecast/branches/kh/icecast/src/auth_url.c	2005-08-18 01:10:43 UTC (rev 9769)
+++ icecast/branches/kh/icecast/src/auth_url.c	2005-08-18 01:17:30 UTC (rev 9770)
@@ -17,7 +17,7 @@
  * be handled. The request will have POST information about the request in
  * the form of
  *
- * action=auth&client=1&server=host&port=8000&mount=/live&user=fred&pass=mypass&ip=127.0.0.1&agent=""
+ * action=listener_add&client=1&server=host&port=8000&mount=/live&user=fred&pass=mypass&ip=127.0.0.1&agent=""
  *
  * For a user to be accecpted the following HTTP header needs
  * to be returned (the actual string can be specified in the xml file)
@@ -33,7 +33,7 @@
  * On client disconnection another request can be sent to a URL with the POST
  * information of
  *
- * action=remove&server=host&port=8000&client=1&mount=/live&user=fred&pass=mypass&duration=3600
+ * action=listener_remove&server=host&port=8000&client=1&mount=/live&user=fred&pass=mypass&duration=3600
  *
  * client refers to the icecast client identification number. mount refers
  * to the mountpoint (beginning with / and may contain query parameters eg ?&
@@ -44,8 +44,8 @@
  * info stored at the auth server. Useful for abnormal outage/termination
  * cases.
  *
- * action=start&mount=/live&server=myserver.com&port=8000
- * action=end&mount=/live&server=myserver.com&port=8000
+ * action=mount_add&mount=/live&server=myserver.com&port=8000
+ * action=mount_remove&mount=/live&server=myserver.com&port=8000
  */
 
 #ifdef HAVE_CONFIG_H
@@ -183,7 +183,7 @@
     mount = util_url_escape (mount);
 
     snprintf (post, sizeof (post),
-            "action=remove&server=%s&port=%d&client=%lu&mount=%s"
+            "action=listener_remove&server=%s&port=%d&client=%lu&mount=%s"
             "&user=%s&pass=%s&duration=%lu",
             server, port, client->con->id, mount, username,
             password, (long unsigned)duration);
@@ -242,7 +242,7 @@
     ipaddr = util_url_escape (client->con->ip);
 
     snprintf (post, sizeof (post),
-            "action=auth&server=%s&port=%d&client=%lu&mount=%s"
+            "action=listener_add&server=%s&port=%d&client=%lu&mount=%s"
             "&user=%s&pass=%s&ip=%s&agent=%s",
             server, port, client->con->id, mount, username,
             password, ipaddr, user_agent);
@@ -302,7 +302,7 @@
     mount = util_url_escape (auth_user->mount);
 
     snprintf (post, sizeof (post),
-            "action=start&mount=%s&server=%s&port=%d", mount, server, port);
+            "action=mount_add&mount=%s&server=%s&port=%d", mount, server, port);
     free (server);
     free (mount);
 
@@ -345,7 +345,7 @@
     mount = util_url_escape (auth_user->mount);
 
     snprintf (post, sizeof (post),
-            "action=end&mount=%s&server=%s&port=%d", mount, server, port);
+            "action=mount_remove&mount=%s&server=%s&port=%d", mount, server, port);
     free (server);
     free (mount);
 
@@ -414,7 +414,7 @@
             free (url_info->auth_header);
             url_info->auth_header = strdup (options->value);
         }
-        if (strcmp(options->name, "timelimit-header") == 0)
+        if (strcmp(options->name, "timelimit_header") == 0)
         {
             free (url_info->timelimit_header);
             url_info->timelimit_header = strdup (options->value);

Modified: icecast/branches/kh/icecast/src/event.c
===================================================================
--- icecast/branches/kh/icecast/src/event.c	2005-08-18 01:10:43 UTC (rev 9769)
+++ icecast/branches/kh/icecast/src/event.c	2005-08-18 01:17:30 UTC (rev 9770)
@@ -36,6 +36,7 @@
     INFO0("Re-reading XML");
     config = config_grab_config(); /* Both to get the lock, and to be able
                                      to find out the config filename */
+    xmlSetGenericErrorFunc ("config", log_parse_failure);
     ret = config_parse_file(config->config_filename, &new_config);
     if(ret < 0) {
         ERROR0("Error parsing config, not replacing existing config");

Modified: icecast/branches/kh/icecast/src/logging.c
===================================================================
--- icecast/branches/kh/icecast/src/logging.c	2005-08-18 01:10:43 UTC (rev 9769)
+++ icecast/branches/kh/icecast/src/logging.c	2005-08-18 01:17:30 UTC (rev 9770)
@@ -192,7 +192,21 @@
 }
 
 
+void log_parse_failure (void *ctx, const char *fmt, ...)
+{
+    char line [200];
+    va_list ap;
+    char *eol;
 
+    va_start (ap, fmt);
+    vsnprintf (line, sizeof (line), fmt, ap);
+    eol = strrchr (line, '\n');
+    if (eol) *eol='\0';
+    va_end (ap);
+    log_write (errorlog, 2, (char*)ctx, "", "%s", line);
+}
+
+
 void restart_logging (ice_config_t *config)
 {
     if (strcmp (config->error_log, "-"))

Modified: icecast/branches/kh/icecast/src/logging.h
===================================================================
--- icecast/branches/kh/icecast/src/logging.h	2005-08-18 01:10:43 UTC (rev 9769)
+++ icecast/branches/kh/icecast/src/logging.h	2005-08-18 01:17:30 UTC (rev 9770)
@@ -95,6 +95,7 @@
 void logging_access(client_t *client);
 void logging_playlist(const char *mount, const char *metadata, long listeners);
 void restart_logging (ice_config_t *config);
+void log_parse_failure (void *ctx, const char *fmt, ...);
 
 #endif  /* __LOGGING_H__ */
 

Modified: icecast/branches/kh/icecast/src/main.c
===================================================================
--- icecast/branches/kh/icecast/src/main.c	2005-08-18 01:10:43 UTC (rev 9769)
+++ icecast/branches/kh/icecast/src/main.c	2005-08-18 01:17:30 UTC (rev 9770)
@@ -63,6 +63,9 @@
 #undef CATMODULE
 #define CATMODULE "main"
 
+static int background;
+static char *pidfile = NULL;
+
 static void _fatal_error(char *perr)
 {
 #ifdef WIN32
@@ -132,7 +135,7 @@
     int i = 1;
     int config_ok = 0;
 
-
+    background = 0;
     if (argc < 2) return -1;
 
     while (i < argc) {
@@ -151,6 +154,7 @@
                 fprintf(stderr, "FATAL: Unable to fork child!");
                 exit(1);
             }
+            background = 1;
 #endif
         }
         if (strcmp(argv[i], "-v") == 0) {
@@ -300,6 +304,8 @@
 /* bind the socket and start listening */
 static int _server_proc_init(void)
 {
+    ice_config_t *config;
+
     if (!_setup_sockets())
         return 0;
 
@@ -307,6 +313,18 @@
         _fatal_error("Failed trying to listen on server socket");
         return 0;
     }
+    config = config_get_config_unlocked();
+    /* recreate the pid file */
+    if (config->pidfile)
+    {
+        FILE *f;
+        pidfile = strdup (config->pidfile);
+        if (pidfile && (f = fopen (config->pidfile, "w")) != NULL)
+        {
+            fprintf (f, "%d\n", (int)getpid());
+            fclose (f);
+        }
+    }
 
     return 1;
 }
@@ -316,6 +334,12 @@
 {
     int i;
 
+    if (background)
+    {
+        fclose (stdin);
+        fclose (stdout);
+        fclose (stderr);
+    }
     connection_accept_loop();
 
     for(i=0; i < MAX_LISTEN_SOCKETS; i++)
@@ -402,8 +426,6 @@
 int main(int argc, char **argv)
 {
     int res, ret;
-    ice_config_t *config;
-    char *pidfile = NULL;
     char filename[512];
     char pbuf[1024];
 
@@ -482,19 +504,6 @@
         return 1;
     }
 
-    config = config_get_config_unlocked();
-    /* recreate the pid file */
-    if (config->pidfile)
-    {
-        FILE *f;
-        pidfile = strdup (config->pidfile);
-        if (pidfile && (f = fopen (config->pidfile, "w")) != NULL)
-        {
-            fprintf (f, "%d\n", (int)getpid());
-            fclose (f);
-        }
-    }
-
     INFO0 (ICECAST_VERSION_STRING " server started");
 
     /* REM 3D Graphics */

Modified: icecast/branches/kh/icecast/src/xslt.c
===================================================================
--- icecast/branches/kh/icecast/src/xslt.c	2005-08-18 01:10:43 UTC (rev 9769)
+++ icecast/branches/kh/icecast/src/xslt.c	2005-08-18 01:17:30 UTC (rev 9770)
@@ -190,6 +190,9 @@
     xmlChar *string;
     int len, problem = 0;
 
+    xmlSetGenericErrorFunc ("", log_parse_failure);
+    xsltSetGenericErrorFunc ("", log_parse_failure);
+
     thread_mutex_lock(&xsltlock);
     cur = xslt_get_stylesheet(xslfilename);
 

Modified: icecast/branches/kh/icecast/web/status.xsl
===================================================================
--- icecast/branches/kh/icecast/web/status.xsl	2005-08-18 01:10:43 UTC (rev 9769)
+++ icecast/branches/kh/icecast/web/status.xsl	2005-08-18 01:17:30 UTC (rev 9770)
@@ -51,7 +51,7 @@
 (<xsl:value-of select="@mount" />)
 <xsl:if test="authenticator"> <a href="/auth.xsl"><img border="0" src="/images/key.png"/></a> </xsl:if>
 <xsl:if test="artwork">
-  <img border="0" alt="">
+  <img border="0" alt="" width="100" height="100">
   <xsl:attribute name="src">
      <xsl:value-of select="artwork"/>
   </xsl:attribute>



More information about the commits mailing list