diff libpurple/protocols/jabber/google.c @ 26606:df9042312063

Switch media to store accounts rather than connections. This for the most part stops it from crashing when ending a session when the connection has been interrupted.
author Mike Ruprecht <maiku@soc.pidgin.im>
date Thu, 09 Apr 2009 21:35:06 +0000
parents cd1f3a1750a1
children 5d1140b0b10a
line wrap: on
line diff
--- a/libpurple/protocols/jabber/google.c	Thu Apr 09 17:59:35 2009 +0000
+++ b/libpurple/protocols/jabber/google.c	Thu Apr 09 21:35:06 2009 +0000
@@ -340,7 +340,8 @@
 	session->remote_jid = jid;
 
 	session->media = purple_media_manager_create_media(
-			purple_media_manager_get(), js->gc,
+			purple_media_manager_get(),
+			purple_connection_get_account(js->gc),
 			"fsrtpconference", session->remote_jid, TRUE);
 
 	purple_media_set_prpl_data(session->media, session);
@@ -389,8 +390,10 @@
 		return;
 	}
 
-	session->media = purple_media_manager_create_media(purple_media_manager_get(), js->gc,
-							   "fsrtpconference", session->remote_jid, FALSE);
+	session->media = purple_media_manager_create_media(
+			purple_media_manager_get(),
+			purple_connection_get_account(js->gc),
+			"fsrtpconference", session->remote_jid, FALSE);
 
 	purple_media_set_prpl_data(session->media, session);
 
@@ -572,8 +575,9 @@
 	if (!id.initiator)
 		return;
 
-	iter = purple_media_manager_get_media_by_connection(
-			purple_media_manager_get(), js->gc);
+	iter = purple_media_manager_get_media_by_account(
+			purple_media_manager_get(),
+			purple_connection_get_account(js->gc));
 	for (; iter; iter = g_list_delete_link(iter, iter)) {
 		GoogleSession *gsession =
 				purple_media_get_prpl_data(iter->data);