cpw.maiku.media_refactor: a7f12792: Store remote_candidates in PurpleMedia a...

maiku at pidgin.im maiku at pidgin.im
Mon Oct 26 22:46:15 EDT 2009


-----------------------------------------------------------------
Revision: a7f127927335d4585b99e30c7cd9cb8b4417405b
Ancestor: 43ca0a1a8d5589a97ee239c174da4d587b8350ea
Author: maiku at pidgin.im
Date: 2009-10-26T18:45:30
Branch: im.pidgin.cpw.maiku.media_refactor
URL: http://d.pidgin.im/viewmtn/revision/info/a7f127927335d4585b99e30c7cd9cb8b4417405b

Modified files:
        libpurple/media/media.c

ChangeLog: 

Store remote_candidates in PurpleMedia as a GList of PurpleMediaCandidate's.

-------------- next part --------------
============================================================
--- libpurple/media/media.c	e980603481b9634fa85cb0ce0cef951b56369297
+++ libpurple/media/media.c	2240970a8f60160c804ff6ded8da7cd37f9db545
@@ -325,7 +325,7 @@ purple_media_stream_free(PurpleMediaStre
 	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 @@ purple_media_stream_info(PurpleMedia *me
 
 			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 @@ purple_media_add_remote_candidates(Purpl
 	}
 
 	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"


More information about the Commits mailing list