[xiph-commits] r8131 - in icecast/trunk/icecast: src web

oddsock at motherfish-iii.xiph.org oddsock at motherfish-iii.xiph.org
Fri Oct 29 08:31:57 PDT 2004


Author: oddsock
Date: 2004-10-29 08:31:56 -0700 (Fri, 29 Oct 2004)
New Revision: 8131

Modified:
   icecast/trunk/icecast/src/source.c
   icecast/trunk/icecast/web/status.xsl
Log:
* 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


Modified: icecast/trunk/icecast/src/source.c
===================================================================
--- icecast/trunk/icecast/src/source.c	2004-10-29 12:22:57 UTC (rev 8130)
+++ icecast/trunk/icecast/src/source.c	2004-10-29 15:31:56 UTC (rev 8131)
@@ -483,6 +483,7 @@
     ice_config_t *config = config_get_config();
     char *listenurl, *str;
     int listen_url_size;
+    char *s;
 
     /* 6 for max size of port */
     listen_url_size = strlen("http://") + strlen(config->hostname) +
@@ -567,8 +568,22 @@
 
         avl_tree_unlock(global.source_tree);
     }
-    if (source->yp_public)
+    if (source->yp_public) {
         yp_add (source);
+    }
+    else {
+    /* If we are a private server, see if ic*-name and description
+       is provided, and if so, add them to the stats */
+        if ((s = httpp_getvar(source->parser, "ice-name"))) {
+            stats_event (source->mount, "server_name", s);
+        }
+        if ((s = httpp_getvar(source->parser, "icy-name"))) {
+            stats_event (source->mount, "server_name", s);
+        }
+        if ((s = httpp_getvar(source->parser, "ice-description"))) {
+            stats_event (source->mount, "server_description", s);
+        }
+    }
 }
 
 
@@ -821,7 +836,7 @@
             if (esc)
             {
                 util_dict_set (source->audio_info, name, esc);
-                stats_event (source->mount, name, value);
+                stats_event (source->mount, name, esc);
                 free (esc);
             }
         }

Modified: icecast/trunk/icecast/web/status.xsl
===================================================================
--- icecast/trunk/icecast/web/status.xsl	2004-10-29 12:22:57 UTC (rev 8130)
+++ icecast/trunk/icecast/web/status.xsl	2004-10-29 15:31:56 UTC (rev 8131)
@@ -34,6 +34,9 @@
 <xsl:if test="bitrate">
 <tr><td>Bitrate:</td><td class="streamdata"> <xsl:value-of select="bitrate" /></td></tr>
 </xsl:if>
+<xsl:if test="quality">
+<tr><td>Quality:</td><td class="streamdata"> <xsl:value-of select="quality" /></td></tr>
+</xsl:if>
 <xsl:if test="listeners">
 <tr><td>Stream Listeners:</td><td class="streamdata"> <xsl:value-of select="listeners" /></td></tr>
 </xsl:if>



More information about the commits mailing list