mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
do proper cleanup on odd cases of source client startup, also take mutex
lock for client_create at relay startup to prevent race svn path=/icecast/trunk/icecast/; revision=10004
This commit is contained in:
parent
32691f498a
commit
7cad0b70d6
@ -748,6 +748,7 @@ static void _handle_source_request (client_t *client, char *uri, int auth_style)
|
||||
source->con = client->con;
|
||||
if (connection_complete_source (source, 1) < 0)
|
||||
{
|
||||
source_clear_source (source);
|
||||
source_free_source (source);
|
||||
}
|
||||
else
|
||||
|
@ -238,13 +238,16 @@ static void *start_relay_stream (void *arg)
|
||||
src->parser = parser;
|
||||
src->con = con;
|
||||
|
||||
global_lock ();
|
||||
if (client_create (&src->client, con, parser) < 0)
|
||||
{
|
||||
global_unlock ();
|
||||
/* make sure only the client_destory frees these */
|
||||
con = NULL;
|
||||
parser = NULL;
|
||||
break;
|
||||
}
|
||||
global_unlock ();
|
||||
con = NULL;
|
||||
parser = NULL;
|
||||
client_set_queue (src->client, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user