diff --git a/conf/icecast.xml.in b/conf/icecast.xml.in
index 02f26d2e..0b1fec48 100644
--- a/conf/icecast.xml.in
+++ b/conf/icecast.xml.in
@@ -90,6 +90,7 @@
/tmp/dump-example1.ogg
65536
/example2.ogg
+ 1
diff --git a/src/auth.h b/src/auth.h
index 99429e53..ff7f1bd4 100644
--- a/src/auth.h
+++ b/src/auth.h
@@ -13,12 +13,15 @@
#ifndef __AUTH_H__
#define __AUTH_H__
-#include "source.h"
-#include "client.h"
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include
+#endif
+
#include
#include
#include
+#include "source.h"
+#include "client.h"
typedef enum
{
diff --git a/src/format.c b/src/format.c
index dafa8c8b..e4143eeb 100644
--- a/src/format.c
+++ b/src/format.c
@@ -74,8 +74,9 @@ int format_get_plugin(format_type_t type, source_t *source)
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;
}
diff --git a/src/fserve.c b/src/fserve.c
index 6726e42b..d715bb6c 100644
--- a/src/fserve.c
+++ b/src/fserve.c
@@ -390,6 +390,7 @@ int fserve_client_create(client_t *httpclient, char *path)
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 @@ int fserve_client_create(client_t *httpclient, char *path)
"Server is full, try again later.\r\n");
if(bytes > 0) httpclient->con->sent_bytes = bytes;
fserve_client_destroy(client);
- global_unlock();
return -1;
}
global.clients++;
diff --git a/src/md5.c b/src/md5.c
index ee93203c..8d6e7168 100644
--- a/src/md5.c
+++ b/src/md5.c
@@ -33,7 +33,9 @@
* and type definitions
*/
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include
+#endif
#include "compat.h"
#include "md5.h"
@@ -185,7 +187,7 @@ void MD5Final(unsigned char digest[HASH_LEN], struct MD5Context *ctx)
# 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<>(32-s)); w += x
+# define MD5STEP(f, w, x, y, z, data, s) do { w += f(x, y, z) + data; w = (w<>(32-s)); w += x; }while(0)
/*
* The core of the MD5 algorithm, this alters an existing MD5 hash to
diff --git a/src/md5.h b/src/md5.h
index 2da4a78f..f650dfc2 100644
--- a/src/md5.h
+++ b/src/md5.h
@@ -13,7 +13,6 @@
#ifndef __MD5_H__
#define __MD5_H__
-#include "config.h"
#include "compat.h"
#define HASH_LEN 16