/pidgin/main: b68ba52aba0b: Fix media compile against new protoc...

Elliott Sales de Andrade qulogic at pidgin.im
Wed May 6 02:58:05 EDT 2015


Changeset: b68ba52aba0b0f35a9d0c159da7e80cd52fc503f
Author:	 Elliott Sales de Andrade <qulogic at pidgin.im>
Date:	 2015-05-06 02:57 -0400
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/b68ba52aba0b

Description:

Fix media compile against new protocol plugin interface.

diffstat:

 libpurple/media.c |  11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diffs (35 lines):

diff --git a/libpurple/media.c b/libpurple/media.c
--- a/libpurple/media.c
+++ b/libpurple/media.c
@@ -1477,8 +1477,7 @@ purple_media_send_dtmf(PurpleMedia *medi
 #ifdef USE_VV
 	PurpleAccount *account = NULL;
 	PurpleConnection *gc = NULL;
-	PurplePlugin *prpl = NULL;
-	PurplePluginProtocolInfo *prpl_info = NULL;
+	PurpleProtocol *protocol = NULL;
 	PurpleMediaBackendIface *backend_iface = NULL;
 
 	if (media)
@@ -1489,9 +1488,7 @@ purple_media_send_dtmf(PurpleMedia *medi
 	if (account)
 		gc = purple_account_get_connection(account);
 	if (gc)
-		prpl = purple_connection_get_prpl(gc);
-	if (prpl)
-		prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl);
+		protocol = purple_connection_get_protocol(gc);
 
 	if (dtmf == 'a')
 		dtmf = 'A';
@@ -1504,8 +1501,8 @@ purple_media_send_dtmf(PurpleMedia *medi
 
 	g_return_val_if_fail(strchr("0123456789ABCD#*", dtmf), FALSE);
 
-	if (prpl_info && PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, media_send_dtmf)
-		&& prpl_info->media_send_dtmf(media, dtmf, volume, duration))
+	if (PURPLE_PROTOCOL_IMPLEMENTS(protocol, MEDIA_IFACE, send_dtmf)
+		&& purple_protocol_media_iface_send_dtmf(protocol, media, dtmf, volume, duration))
 	{
 		return TRUE;
 	} else if (backend_iface && backend_iface->send_dtmf



More information about the Commits mailing list