[xiph-commits] r9116 - icecast/branches/kh/icecast/src
karl at motherfish-iii.xiph.org
karl at motherfish-iii.xiph.org
Wed Apr 6 09:49:16 PDT 2005
Author: karl
Date: 2005-04-06 09:49:12 -0700 (Wed, 06 Apr 2005)
New Revision: 9116
Modified:
icecast/branches/kh/icecast/src/auth.c
icecast/branches/kh/icecast/src/auth_htpasswd.c
icecast/branches/kh/icecast/src/connection.c
icecast/branches/kh/icecast/src/fserve.c
icecast/branches/kh/icecast/src/util.c
Log:
sync with fixes applied to trunk
Modified: icecast/branches/kh/icecast/src/auth.c
===================================================================
--- icecast/branches/kh/icecast/src/auth.c 2005-04-06 15:58:06 UTC (rev 9115)
+++ icecast/branches/kh/icecast/src/auth.c 2005-04-06 16:49:12 UTC (rev 9116)
@@ -50,7 +50,6 @@
char *header = httpp_getvar(client->parser, "authorization");
char *userpass, *tmp;
char *username, *password;
- auth_client *auth_user;
if (header == NULL || strncmp(header, "Basic ", 6))
{
@@ -69,7 +68,6 @@
tmp = strchr(userpass, ':');
if (tmp == NULL)
{
- free (auth_user);
free (userpass);
return;
}
Modified: icecast/branches/kh/icecast/src/auth_htpasswd.c
===================================================================
--- icecast/branches/kh/icecast/src/auth_htpasswd.c 2005-04-06 15:58:06 UTC (rev 9115)
+++ icecast/branches/kh/icecast/src/auth_htpasswd.c 2005-04-06 16:49:12 UTC (rev 9116)
@@ -104,7 +104,7 @@
sep = strchr(line, ':');
if(sep == NULL) {
- DEBUG0("No seperator in line");
+ DEBUG0("No separator in line");
continue;
}
@@ -188,7 +188,7 @@
continue;
sep = strchr(line, ':');
if(sep == NULL) {
- DEBUG0("No seperator in line");
+ DEBUG0("No separator in line");
continue;
}
*sep = 0;
@@ -287,7 +287,7 @@
sep = strchr(line, ':');
if(sep == NULL) {
- DEBUG0("No seperator in line");
+ DEBUG0("No separator in line");
continue;
}
@@ -347,7 +347,7 @@
sep = strchr(line, ':');
if(sep == NULL) {
- DEBUG0("No seperator in line");
+ DEBUG0("No separator in line");
continue;
}
Modified: icecast/branches/kh/icecast/src/connection.c
===================================================================
--- icecast/branches/kh/icecast/src/connection.c 2005-04-06 15:58:06 UTC (rev 9115)
+++ icecast/branches/kh/icecast/src/connection.c 2005-04-06 16:49:12 UTC (rev 9116)
@@ -763,7 +763,7 @@
if (config->hostname)
host = strdup (config->hostname);
port = config->port;
- for(i = 0; i < MAX_LISTEN_SOCKETS; i++) {
+ for(i = 0; i < global.server_sockets; i++) {
if(global.serversock[i] == con->serversock) {
serverhost = config->listeners[i].bind_address;
serverport = config->listeners[i].port;
Modified: icecast/branches/kh/icecast/src/fserve.c
===================================================================
--- icecast/branches/kh/icecast/src/fserve.c 2005-04-06 15:58:06 UTC (rev 9115)
+++ icecast/branches/kh/icecast/src/fserve.c 2005-04-06 16:49:12 UTC (rev 9116)
@@ -143,7 +143,9 @@
}
}
- if (poll(ufds, fserve_clients, 200) > 0)
+ if (!ufds)
+ thread_sleep(200000);
+ else if (poll(ufds, fserve_clients, 200) > 0)
{
/* mark any clients that are ready */
fclient = active_list;
@@ -298,6 +300,11 @@
{
fserve_t *to_go = (fserve_t *)pending_list;
pending_list = to_go->next;
+
+ /* Argh! _free_client decrements "clients" in stats, but it hasn't been
+ incremented if the client is still on the pending list. So, fix that
+ up first. Messy. */
+ stats_event_inc(NULL, "clients");
_free_client (to_go);
}
thread_mutex_unlock (&pending_lock);
Modified: icecast/branches/kh/icecast/src/util.c
===================================================================
--- icecast/branches/kh/icecast/src/util.c 2005-04-06 15:58:06 UTC (rev 9115)
+++ icecast/branches/kh/icecast/src/util.c 2005-04-06 16:49:12 UTC (rev 9116)
@@ -463,6 +463,10 @@
}
*out++ = vals[0]<<2 | vals[1]>>4;
+ /* vals[3] and (if that is) vals[2] can be '=' as padding, which is
+ looked up in the base64decode table as '-1'. Check for this case,
+ and output zero-terminators instead of characters if we've got
+ padding. */
if(vals[2] >= 0)
*out++ = ((vals[1]&0x0F)<<4) | (vals[2]>>2);
else
More information about the commits
mailing list