changeset 27080:f0621e47ccf3

Make Gmail accept speex as the codec.
author Mike Ruprecht <maiku@soc.pidgin.im>
date Tue, 02 Jun 2009 05:10:19 +0000
parents 72bcdcb0629f
children 5a4451b8fe29 432f02730dc1
files libpurple/protocols/jabber/google.c
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/google.c	Tue Jun 02 05:00:20 2009 +0000
+++ b/libpurple/protocols/jabber/google.c	Tue Jun 02 05:10:19 2009 +0000
@@ -263,7 +263,14 @@
 			if (session->video)
 				xmlnode_set_namespace(payload, NS_GOOGLE_PHONE);
 			xmlnode_set_attrib(payload, "id", id);
-			xmlnode_set_attrib(payload, "name", encoding_name);
+			/*
+			 * Hack to make Gmail accept speex as the codec.
+			 * It shouldn't have to be case sensitive.
+			 */
+			if (purple_strequal(encoding_name, "SPEEX"))
+				xmlnode_set_attrib(payload, "name", "speex");
+			else
+				xmlnode_set_attrib(payload, "name", encoding_name);
 			xmlnode_set_attrib(payload, "clockrate", clock_rate);
 			g_free(clock_rate);
 			g_free(encoding_name);