1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-11-03 04:17:17 -05:00

fix hard to trigger race, resync doc to trunk

svn path=/icecast/branches/kh/icecast/; revision=8794
This commit is contained in:
Karl Heyes 2005-01-26 20:52:28 +00:00
parent 720523e2b1
commit 498ff5c74d
2 changed files with 11 additions and 5 deletions

View File

@ -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>
&lt;directory&gt;
&lt;yp-url-timeout&gt;15&lt;yp-url-timeout&gt;
&lt;yp-url&gt;http://dir.xiph.org/cgi-bin/yp-cgi&lt;yp-url&gt;
&lt;directory&gt;
&lt;yp-url-timeout&gt;15&lt;/yp-url-timeout&gt;
&lt;yp-url&gt;http://dir.xiph.org/cgi-bin/yp-cgi&lt;/yp-url&gt;
&lt;/directory&gt;
</pre>
<p>Multiple directory XML chunks can be specified in order to be listed in multiple directories.</p>
<br />

View File

@ -752,7 +752,7 @@ static void _handle_get_request(connection_t *con,
int bytes;
struct stat statbuf;
int fileserve;
char *host;
char *host = NULL;
int port;
int i;
char *serverhost = NULL;
@ -765,7 +765,8 @@ static void _handle_get_request(connection_t *con,
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 @@ static void _handle_get_request(connection_t *con,
(strncmp(uri, "/admin/", 7) == 0)) {
admin_handle_request(client, uri);
if (uri != passed_uri) free (uri);
free (host);
return;
}
@ -831,6 +833,7 @@ static void _handle_get_request(connection_t *con,
}
free(fullpath);
if (uri != passed_uri) free (uri);
free (host);
return;
}
else if(fileserve && stat(fullpath, &statbuf) == 0 &&
@ -843,6 +846,7 @@ static void _handle_get_request(connection_t *con,
fserve_client_create(client, fullpath);
free(fullpath);
if (uri != passed_uri) free (uri);
free (host);
return;
}
free(fullpath);
@ -864,8 +868,10 @@ static void _handle_get_request(connection_t *con,
client_destroy(client);
free(sourceuri);
if (uri != passed_uri) free (uri);
free (host);
return;
}
free (host);
global_lock();
if (global.clients >= client_limit)