[xiph-commits] r10004 - icecast/trunk/icecast/src
karl at svn.xiph.org
karl at svn.xiph.org
Thu Sep 8 06:32:20 PDT 2005
Author: karl
Date: 2005-09-08 06:32:17 -0700 (Thu, 08 Sep 2005)
New Revision: 10004
Modified:
icecast/trunk/icecast/src/connection.c
icecast/trunk/icecast/src/slave.c
Log:
do proper cleanup on odd cases of source client startup, also take mutex
lock for client_create at relay startup to prevent race
Modified: icecast/trunk/icecast/src/connection.c
===================================================================
--- icecast/trunk/icecast/src/connection.c 2005-09-08 12:03:38 UTC (rev 10003)
+++ icecast/trunk/icecast/src/connection.c 2005-09-08 13:32:17 UTC (rev 10004)
@@ -748,6 +748,7 @@
source->con = client->con;
if (connection_complete_source (source, 1) < 0)
{
+ source_clear_source (source);
source_free_source (source);
}
else
Modified: icecast/trunk/icecast/src/slave.c
===================================================================
--- icecast/trunk/icecast/src/slave.c 2005-09-08 12:03:38 UTC (rev 10003)
+++ icecast/trunk/icecast/src/slave.c 2005-09-08 13:32:17 UTC (rev 10004)
@@ -238,13 +238,16 @@
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);
More information about the commits
mailing list