[xiph-commits] r8236 - in icecast/trunk/icecast: conf src

karl at motherfish-iii.xiph.org karl at motherfish-iii.xiph.org
Fri Nov 19 18:17:00 PST 2004


Author: karl
Date: 2004-11-19 18:16:59 -0800 (Fri, 19 Nov 2004)
New Revision: 8236

Modified:
   icecast/trunk/icecast/conf/icecast.xml.in
   icecast/trunk/icecast/src/auth.h
   icecast/trunk/icecast/src/format.c
   icecast/trunk/icecast/src/fserve.c
   icecast/trunk/icecast/src/md5.c
   icecast/trunk/icecast/src/md5.h
Log:
minor cleanups


Modified: icecast/trunk/icecast/conf/icecast.xml.in
===================================================================
--- icecast/trunk/icecast/conf/icecast.xml.in	2004-11-19 23:04:27 UTC (rev 8235)
+++ icecast/trunk/icecast/conf/icecast.xml.in	2004-11-20 02:16:59 UTC (rev 8236)
@@ -90,6 +90,7 @@
         <dump-file>/tmp/dump-example1.ogg</dump-file>
         <burst-size>65536</burst-size>
         <fallback-mount>/example2.ogg</fallback-mount>
+        <fallback-override>1</fallback-override>
         <authentication type="htpasswd">
                 <option name="filename" value="myauth"/>
                 <option name="allow_duplicate_users" value="0"/>

Modified: icecast/trunk/icecast/src/auth.h
===================================================================
--- icecast/trunk/icecast/src/auth.h	2004-11-19 23:04:27 UTC (rev 8235)
+++ icecast/trunk/icecast/src/auth.h	2004-11-20 02:16:59 UTC (rev 8236)
@@ -13,12 +13,15 @@
 #ifndef __AUTH_H__
 #define __AUTH_H__
 
-#include "source.h"
-#include "client.h"
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include <libxml/xmlmemory.h>
 #include <libxml/parser.h>
 #include <libxml/tree.h>
+#include "source.h"
+#include "client.h"
 
 typedef enum
 {

Modified: icecast/trunk/icecast/src/format.c
===================================================================
--- icecast/trunk/icecast/src/format.c	2004-11-19 23:04:27 UTC (rev 8235)
+++ icecast/trunk/icecast/src/format.c	2004-11-20 02:16:59 UTC (rev 8236)
@@ -74,8 +74,9 @@
     default:
         break;
     }
-    stats_event (source->mount, "content-type", 
-                 source->format->contenttype);
+    if (ret < 0)
+        stats_event (source->mount, "content-type", 
+                source->format->contenttype);
 
     return ret;
 }

Modified: icecast/trunk/icecast/src/fserve.c
===================================================================
--- icecast/trunk/icecast/src/fserve.c	2004-11-19 23:04:27 UTC (rev 8235)
+++ icecast/trunk/icecast/src/fserve.c	2004-11-20 02:16:59 UTC (rev 8236)
@@ -390,6 +390,7 @@
 
     global_lock();
     if(global.clients >= client_limit) {
+        global_unlock();
         httpclient->respcode = 504;
         bytes = sock_write(httpclient->con->sock,
                 "HTTP/1.0 504 Server Full\r\n"
@@ -397,7 +398,6 @@
                 "<b>Server is full, try again later.</b>\r\n");
         if(bytes > 0) httpclient->con->sent_bytes = bytes;
         fserve_client_destroy(client);
-        global_unlock();
         return -1;
     }
     global.clients++;

Modified: icecast/trunk/icecast/src/md5.c
===================================================================
--- icecast/trunk/icecast/src/md5.c	2004-11-19 23:04:27 UTC (rev 8235)
+++ icecast/trunk/icecast/src/md5.c	2004-11-20 02:16:59 UTC (rev 8236)
@@ -33,7 +33,9 @@
  * and type definitions
  */
 
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 #include "compat.h"
 #include "md5.h"
 
@@ -185,7 +187,7 @@
 # define F4(x, y, z) (y ^ (x | ~z))
 
 /* This is the central step in the MD5 algorithm. */
-# define MD5STEP(f, w, x, y, z, data, s) w += f(x, y, z) + data;  w = (w<<s) | (w>>(32-s));  w += x 
+# define MD5STEP(f, w, x, y, z, data, s) do { w += f(x, y, z) + data;  w = (w<<s) | (w>>(32-s));  w += x; }while(0)
 
 /*
  * The core of the MD5 algorithm, this alters an existing MD5 hash to

Modified: icecast/trunk/icecast/src/md5.h
===================================================================
--- icecast/trunk/icecast/src/md5.h	2004-11-19 23:04:27 UTC (rev 8235)
+++ icecast/trunk/icecast/src/md5.h	2004-11-20 02:16:59 UTC (rev 8236)
@@ -13,7 +13,6 @@
 #ifndef __MD5_H__
 #define __MD5_H__
 
-#include "config.h"
 #include "compat.h"
 
 #define HASH_LEN     16



More information about the commits mailing list