[xiph-commits] r9350 - in icecast/branches/kh/icecast: admin src web

karl at motherfish-iii.xiph.org karl at motherfish-iii.xiph.org
Sat Jun 4 10:12:38 PDT 2005


Author: karl
Date: 2005-06-04 10:12:33 -0700 (Sat, 04 Jun 2005)
New Revision: 9350

Modified:
   icecast/branches/kh/icecast/admin/stats.xsl
   icecast/branches/kh/icecast/src/source.c
   icecast/branches/kh/icecast/src/stats.c
   icecast/branches/kh/icecast/web/status.xsl
Log:
don't go silly on the stats logging for the moment.  Add user_agent to stats
from source client if one present. A small update to the xsl pages.


Modified: icecast/branches/kh/icecast/admin/stats.xsl
===================================================================
--- icecast/branches/kh/icecast/admin/stats.xsl	2005-06-04 15:26:05 UTC (rev 9349)
+++ icecast/branches/kh/icecast/admin/stats.xsl	2005-06-04 17:12:33 UTC (rev 9350)
@@ -54,8 +54,9 @@
 <xsl:for-each select="source">
 <xsl:if test = "listeners!=''"> 
 <h3>
+<a href="{@mount}.m3u">
 <xsl:if test="server_name"><xsl:value-of select="server_name" /> </xsl:if>
-(<xsl:value-of select="@mount" />)
+(<xsl:value-of select="@mount" />)</a>
 <xsl:if test="authenticator"> <a href="manageauth.xsl?mount={@mount}"><img border="0" src="/key.gif"/></a> </xsl:if>
 </h3>
 	<table border="0" cellpadding="1" cellspacing="5" bgcolor="444444">

Modified: icecast/branches/kh/icecast/src/source.c
===================================================================
--- icecast/branches/kh/icecast/src/source.c	2005-06-04 15:26:05 UTC (rev 9349)
+++ icecast/branches/kh/icecast/src/source.c	2005-06-04 17:12:33 UTC (rev 9350)
@@ -649,6 +649,7 @@
     thread_mutex_lock (&source->lock);
 
     stats_event (source->mount, "server_type", source->format->contenttype);
+    stats_event_args (source->mount, "listener_peak", "0");
 
     if (source->dumpfilename != NULL)
     {
@@ -1173,6 +1174,8 @@
 
     if (source->client && source->client->con)
     {
+        const char *agent;
+
         source->client->respcode = 200;
         bytes = sock_write_bytes (source->client->con->sock, ok_msg, sizeof (ok_msg)-1);
         if (bytes < (int)(sizeof (ok_msg)-1))
@@ -1185,6 +1188,9 @@
             return NULL;
         }
         stats_event (source->mount, "source_ip", source->client->con->ip);
+        agent = httpp_getvar (source->client->parser, "user-agent");
+        if (agent)
+            stats_event (source->mount, "user_agent", agent);
     }
     stats_event_inc(NULL, "source_client_connections");
     stats_event (source->mount, "listeners", "0");

Modified: icecast/branches/kh/icecast/src/stats.c
===================================================================
--- icecast/branches/kh/icecast/src/stats.c	2005-06-04 15:26:05 UTC (rev 9349)
+++ icecast/branches/kh/icecast/src/stats.c	2005-06-04 17:12:33 UTC (rev 9350)
@@ -426,7 +426,7 @@
         str = (char *)strdup (event->value);
     free (node->value);
     node->value = str;
-    DEBUG2 ("update node %s (%s)", node->name, node->value);
+    /* DEBUG2 ("update node %s (%s)", node->name, node->value); */
 }
 
 

Modified: icecast/branches/kh/icecast/web/status.xsl
===================================================================
--- icecast/branches/kh/icecast/web/status.xsl	2005-06-04 15:26:05 UTC (rev 9349)
+++ icecast/branches/kh/icecast/web/status.xsl	2005-06-04 17:12:33 UTC (rev 9350)
@@ -50,6 +50,9 @@
 <xsl:if test="listeners">
 <tr><td>Stream Listeners:</td><td class="streamdata"> <xsl:value-of select="listeners" /></td></tr>
 </xsl:if>
+<xsl:if test="listener_peak">
+<tr><td>Listener Peak:</td><td class="streamdata"> <xsl:value-of select="listener_peak" /></td></tr>
+</xsl:if>
 <xsl:if test="genre">
 <tr><td>Stream Genre:</td><td class="streamdata"> <xsl:value-of select="genre" /></td></tr>
 </xsl:if>



More information about the commits mailing list