Commit c7432d66 authored by Karl Heyes's avatar Karl Heyes

minor cleanups

svn path=/icecast/trunk/icecast/; revision=8236
parent 7dfcbf56
...@@ -90,6 +90,7 @@ ...@@ -90,6 +90,7 @@
<dump-file>/tmp/dump-example1.ogg</dump-file> <dump-file>/tmp/dump-example1.ogg</dump-file>
<burst-size>65536</burst-size> <burst-size>65536</burst-size>
<fallback-mount>/example2.ogg</fallback-mount> <fallback-mount>/example2.ogg</fallback-mount>
<fallback-override>1</fallback-override>
<authentication type="htpasswd"> <authentication type="htpasswd">
<option name="filename" value="myauth"/> <option name="filename" value="myauth"/>
<option name="allow_duplicate_users" value="0"/> <option name="allow_duplicate_users" value="0"/>
......
...@@ -13,12 +13,15 @@ ...@@ -13,12 +13,15 @@
#ifndef __AUTH_H__ #ifndef __AUTH_H__
#define __AUTH_H__ #define __AUTH_H__
#include "source.h" #ifdef HAVE_CONFIG_H
#include "client.h" #include <config.h>
#include "config.h" #endif
#include <libxml/xmlmemory.h> #include <libxml/xmlmemory.h>
#include <libxml/parser.h> #include <libxml/parser.h>
#include <libxml/tree.h> #include <libxml/tree.h>
#include "source.h"
#include "client.h"
typedef enum typedef enum
{ {
......
...@@ -74,8 +74,9 @@ int format_get_plugin(format_type_t type, source_t *source) ...@@ -74,8 +74,9 @@ int format_get_plugin(format_type_t type, source_t *source)
default: default:
break; break;
} }
stats_event (source->mount, "content-type", if (ret < 0)
source->format->contenttype); stats_event (source->mount, "content-type",
source->format->contenttype);
return ret; return ret;
} }
......
...@@ -390,6 +390,7 @@ int fserve_client_create(client_t *httpclient, char *path) ...@@ -390,6 +390,7 @@ int fserve_client_create(client_t *httpclient, char *path)
global_lock(); global_lock();
if(global.clients >= client_limit) { if(global.clients >= client_limit) {
global_unlock();
httpclient->respcode = 504; httpclient->respcode = 504;
bytes = sock_write(httpclient->con->sock, bytes = sock_write(httpclient->con->sock,
"HTTP/1.0 504 Server Full\r\n" "HTTP/1.0 504 Server Full\r\n"
...@@ -397,7 +398,6 @@ int fserve_client_create(client_t *httpclient, char *path) ...@@ -397,7 +398,6 @@ int fserve_client_create(client_t *httpclient, char *path)
"<b>Server is full, try again later.</b>\r\n"); "<b>Server is full, try again later.</b>\r\n");
if(bytes > 0) httpclient->con->sent_bytes = bytes; if(bytes > 0) httpclient->con->sent_bytes = bytes;
fserve_client_destroy(client); fserve_client_destroy(client);
global_unlock();
return -1; return -1;
} }
global.clients++; global.clients++;
......
...@@ -33,7 +33,9 @@ ...@@ -33,7 +33,9 @@
* and type definitions * and type definitions
*/ */
#include "config.h" #ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "compat.h" #include "compat.h"
#include "md5.h" #include "md5.h"
...@@ -185,7 +187,7 @@ void MD5Final(unsigned char digest[HASH_LEN], struct MD5Context *ctx) ...@@ -185,7 +187,7 @@ void MD5Final(unsigned char digest[HASH_LEN], struct MD5Context *ctx)
# define F4(x, y, z) (y ^ (x | ~z)) # define F4(x, y, z) (y ^ (x | ~z))
/* This is the central step in the MD5 algorithm. */ /* 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 * The core of the MD5 algorithm, this alters an existing MD5 hash to
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#ifndef __MD5_H__ #ifndef __MD5_H__
#define __MD5_H__ #define __MD5_H__
#include "config.h"
#include "compat.h" #include "compat.h"
#define HASH_LEN 16 #define HASH_LEN 16
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment