changeset 29166:18571ea6e44a

Store remote_candidates in PurpleMedia as a GList of PurpleMediaCandidate's.
author maiku@pidgin.im
date Mon, 26 Oct 2009 18:45:30 +0000
parents cb843608e183
children 7713312c4ab0
files libpurple/media/media.c
diffstat 1 files changed, 12 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/media/media.c	Mon Oct 26 18:32:27 2009 +0000
+++ b/libpurple/media/media.c	Mon Oct 26 18:45:30 2009 +0000
@@ -325,7 +325,7 @@
 	if (stream->local_candidates)
 		purple_media_candidate_list_free(stream->local_candidates);
 	if (stream->remote_candidates)
-		fs_candidate_list_destroy(stream->remote_candidates);
+		purple_media_candidate_list_free(stream->remote_candidates);
 
 	if (stream->active_local_candidates)
 		fs_candidate_list_destroy(stream->active_local_candidates);
@@ -1117,8 +1117,13 @@
 
 			if (stream->remote_candidates != NULL) {
 				GError *err = NULL;
+				GList *candidates;
+
+				candidates = purple_media_candidate_list_to_fs(
+						stream->remote_candidates);
 				fs_stream_set_remote_candidates(stream->stream,
-						stream->remote_candidates, &err);
+						candidates, &err);
+				fs_candidate_list_destroy(candidates);
 
 				if (err) {
 					purple_debug_error("media", "Error adding remote"
@@ -1680,11 +1685,14 @@
 	}
 
 	stream->remote_candidates = g_list_concat(stream->remote_candidates,
-			purple_media_candidate_list_to_fs(remote_candidates));
+			purple_media_candidate_list_copy(remote_candidates));
 
 	if (stream->accepted == TRUE) {
+		GList *candidates = purple_media_candidate_list_to_fs(
+				stream->remote_candidates);
 		fs_stream_set_remote_candidates(stream->stream,
-				stream->remote_candidates, &err);
+				candidates, &err);
+		fs_candidate_list_destroy(candidates);
 
 		if (err) {
 			purple_debug_error("media", "Error adding remote"