cpw.malu.xmpp.google_ft: 9e2901a7: move some code to the generic session de...

malu at pidgin.im malu at pidgin.im
Mon Sep 13 16:33:04 EDT 2010


----------------------------------------------------------------------
Revision: 9e2901a7a9c2eefdb124ff99b43fee19c6a5d025
Parent:   6edb7e47b669580c3b6b3b9d7881201f2f5d759c
Author:   malu at pidgin.im
Date:     09/13/10 16:27:46
Branch:   im.pidgin.cpw.malu.xmpp.google_ft
URL: http://d.pidgin.im/viewmtn/revision/info/9e2901a7a9c2eefdb124ff99b43fee19c6a5d025

Changelog: 

move some code to the generic session destroy function

Changes against parent 6edb7e47b669580c3b6b3b9d7881201f2f5d759c

  patched  libpurple/protocols/jabber/google/google_av.c
  patched  libpurple/protocols/jabber/google/google_session.c
  patched  libpurple/protocols/jabber/google/google_session.h

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/google/google_session.c	6ee8d511974546d3c9ca1410683cfff930347200
+++ libpurple/protocols/jabber/google/google_session.c	81fefa9f4e2b619439e4014394de5dc9793772c3
@@ -27,9 +27,11 @@ static GList *google_sessions = NULL;
 
 static GList *google_sessions = NULL;
 
-static void
+void
 google_session_destroy(GoogleSession *session)
 {
+	jabber_google_session_unregister(session);
+
 	g_free(session->id.id);
 	g_free(session->id.initiator);
 	g_free(session->remote_jid);
@@ -37,6 +39,7 @@ google_session_destroy(GoogleSession *se
 	if (session->description)
 		xmlnode_free(session->description);
 
+	g_free(session->session_data);
 	g_free(session);
 }
 
============================================================
--- libpurple/protocols/jabber/google/google_session.h	c74401803952cd156ec4276a8e75fdf726bdbb81
+++ libpurple/protocols/jabber/google/google_session.h	71be0f1a2ac2c6645530017dc7c3dfb61869f47b
@@ -65,6 +65,8 @@ struct _GoogleSession {
 	GoogleSessionHandleTerminateCallback *handle_terminate_cb;
 };
 
+void jabber_google_session_destroy(GoogleSession *session);
+
 void jabber_google_session_parse(JabberStream *js, const char *from,
     JabberIqType type, const char *iq, xmlnode *session);
 
============================================================
--- libpurple/protocols/jabber/google/google_av.c	c8f6899bb6211050d3488381733e441e5abf7812
+++ libpurple/protocols/jabber/google/google_av.c	688f5c75bef6d02efaf093a38c392a3a1bd71c07
@@ -42,20 +42,13 @@ google_av_destroy(GoogleSession *session
 	GoogleAVSessionData *session_data =
 		(GoogleAVSessionData *) session->session_data;
 
-	jabber_google_session_unregister(session);
-	
-	g_free(session->id.id);
-	g_free(session->id.initiator);
-	g_free(session->remote_jid);
-
 	if (session_data->remote_audio_candidates)
 		purple_media_candidate_list_free(session_data->remote_audio_candidates);
 
 	if (session_data->remote_video_candidates)
 		purple_media_candidate_list_free(session_data->remote_video_candidates);
 
-	g_free(session->session_data);
-	g_free(session);
+	jabber_google_session_destroy(session);
 }
 
 static void


More information about the Commits mailing list