[xiph-commits] r9858 - icecast/branches/kh/icecast/src
karl at svn.xiph.org
karl at svn.xiph.org
Sun Aug 28 08:06:00 PDT 2005
Author: karl
Date: 2005-08-28 08:05:55 -0700 (Sun, 28 Aug 2005)
New Revision: 9858
Modified:
icecast/branches/kh/icecast/src/connection.c
icecast/branches/kh/icecast/src/connection.h
icecast/branches/kh/icecast/src/slave.c
icecast/branches/kh/icecast/src/source.c
Log:
fix double free bug on failed to start relays. remove unused parameter to
internal function
Modified: icecast/branches/kh/icecast/src/connection.c
===================================================================
--- icecast/branches/kh/icecast/src/connection.c 2005-08-27 01:01:29 UTC (rev 9857)
+++ icecast/branches/kh/icecast/src/connection.c 2005-08-28 15:05:55 UTC (rev 9858)
@@ -611,7 +611,7 @@
/* Called when activating a source. Verifies that the source count is not
* exceeded and applies any initial parameters.
*/
-int connection_complete_source (source_t *source, connection_t *con, http_parser_t *in_parser, int response)
+int connection_complete_source (source_t *source, http_parser_t *in_parser, int response)
{
ice_config_t *config = config_get_config();
@@ -879,7 +879,7 @@
source->shoutcast_compat = 1;
}
source->client = client;
- if (connection_complete_source (source, NULL, NULL, 1) < 0)
+ if (connection_complete_source (source, NULL, 1) < 0)
{
source_free_source (source);
}
Modified: icecast/branches/kh/icecast/src/connection.h
===================================================================
--- icecast/branches/kh/icecast/src/connection.h 2005-08-27 01:01:29 UTC (rev 9857)
+++ icecast/branches/kh/icecast/src/connection.h 2005-08-28 15:05:55 UTC (rev 9858)
@@ -55,7 +55,7 @@
void connection_accept_loop(void);
void connection_close(connection_t *con);
connection_t *connection_create (sock_t sock, sock_t serversock, char *ip);
-int connection_complete_source (struct source_tag *source, connection_t *con,
+int connection_complete_source (struct source_tag *source,
http_parser_t *parser, int response);
int connection_check_source_pass(http_parser_t *parser, const char *mount);
Modified: icecast/branches/kh/icecast/src/slave.c
===================================================================
--- icecast/branches/kh/icecast/src/slave.c 2005-08-27 01:01:29 UTC (rev 9857)
+++ icecast/branches/kh/icecast/src/slave.c 2005-08-28 15:05:55 UTC (rev 9858)
@@ -315,12 +315,13 @@
/* make sure only the client_destory frees these */
con = NULL;
parser = NULL;
- streamsock = SOCK_ERROR;
break;
}
+ con = NULL;
+ parser = NULL;
client_set_queue (src->client, NULL);
- if (connection_complete_source (src, con, parser, 0) < 0)
+ if (connection_complete_source (src, NULL, 0) < 0)
{
DEBUG0("Failed to complete source initialisation");
break;
@@ -358,8 +359,6 @@
avl_tree_unlock (global.source_tree);
}
- if (con == NULL && streamsock != SOCK_ERROR)
- sock_close (streamsock);
if (con)
connection_close (con);
if (parser)
Modified: icecast/branches/kh/icecast/src/source.c
===================================================================
--- icecast/branches/kh/icecast/src/source.c 2005-08-27 01:01:29 UTC (rev 9857)
+++ icecast/branches/kh/icecast/src/source.c 2005-08-28 15:05:55 UTC (rev 9858)
@@ -1307,7 +1307,7 @@
source->intro_file = file;
file = NULL;
- if (connection_complete_source (source, NULL, parser, 0) < 0)
+ if (connection_complete_source (source, parser, 0) < 0)
break;
source_client_thread (source);
httpp_destroy (parser);
More information about the commits
mailing list