[xiph-commits] r8794 - in icecast/branches/kh/icecast: doc src
karl at motherfish-iii.xiph.org
karl at motherfish-iii.xiph.org
Wed Jan 26 12:52:30 PST 2005
Author: karl
Date: 2005-01-26 12:52:28 -0800 (Wed, 26 Jan 2005)
New Revision: 8794
Modified:
icecast/branches/kh/icecast/doc/icecast2_yp.html
icecast/branches/kh/icecast/src/connection.c
Log:
fix hard to trigger race, resync doc to trunk
Modified: icecast/branches/kh/icecast/doc/icecast2_yp.html
===================================================================
--- icecast/branches/kh/icecast/doc/icecast2_yp.html 2005-01-26 16:20:21 UTC (rev 8793)
+++ icecast/branches/kh/icecast/doc/icecast2_yp.html 2005-01-26 20:52:28 UTC (rev 8794)
@@ -23,9 +23,9 @@
<p>If icecast has been built with YP support, then the following configuration options control the YP directory settings:</p>
<pre>
<directory>
- <yp-url-timeout>15<yp-url-timeout>
- <yp-url>http://dir.xiph.org/cgi-bin/yp-cgi<yp-url>
- <directory>
+ <yp-url-timeout>15</yp-url-timeout>
+ <yp-url>http://dir.xiph.org/cgi-bin/yp-cgi</yp-url>
+ </directory>
</pre>
<p>Multiple directory XML chunks can be specified in order to be listed in multiple directories.</p>
<br />
Modified: icecast/branches/kh/icecast/src/connection.c
===================================================================
--- icecast/branches/kh/icecast/src/connection.c 2005-01-26 16:20:21 UTC (rev 8793)
+++ icecast/branches/kh/icecast/src/connection.c 2005-01-26 20:52:28 UTC (rev 8794)
@@ -752,7 +752,7 @@
int bytes;
struct stat statbuf;
int fileserve;
- char *host;
+ char *host = NULL;
int port;
int i;
char *serverhost = NULL;
@@ -765,7 +765,8 @@
DEBUG1("start with %s", passed_uri);
config = config_get_config();
fileserve = config->fileserve;
- host = config->hostname;
+ if (config->hostname)
+ host = strdup (config->hostname);
port = config->port;
for(i = 0; i < MAX_LISTEN_SOCKETS; i++) {
if(global.serversock[i] == con->serversock) {
@@ -807,6 +808,7 @@
(strncmp(uri, "/admin/", 7) == 0)) {
admin_handle_request(client, uri);
if (uri != passed_uri) free (uri);
+ free (host);
return;
}
@@ -831,6 +833,7 @@
}
free(fullpath);
if (uri != passed_uri) free (uri);
+ free (host);
return;
}
else if(fileserve && stat(fullpath, &statbuf) == 0 &&
@@ -843,6 +846,7 @@
fserve_client_create(client, fullpath);
free(fullpath);
if (uri != passed_uri) free (uri);
+ free (host);
return;
}
free(fullpath);
@@ -864,8 +868,10 @@
client_destroy(client);
free(sourceuri);
if (uri != passed_uri) free (uri);
+ free (host);
return;
}
+ free (host);
global_lock();
if (global.clients >= client_limit)
More information about the commits
mailing list