pidgin: 1fe53299: jabber: set priority on remote candidate...

malu at pidgin.im malu at pidgin.im
Sat Sep 4 13:55:48 EDT 2010


----------------------------------------------------------------------
Revision: 1fe5329935f43a65155a01681228bdab48f3b48b
Parent:   211508e7ca6864e6114a97e76d3bb0cdb25a8966
Author:   malu at pidgin.im
Date:     09/04/10 11:47:59
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/1fe5329935f43a65155a01681228bdab48f3b48b

Changelog: 

jabber: set priority on remote candidates for Google-style vv

Changes against parent 211508e7ca6864e6114a97e76d3bb0cdb25a8966

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

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/google/google_session.c	bd83f1588b57ef98f4f1e5f0a73b03b03b494609
+++ libpurple/protocols/jabber/google/google_session.c	1c1dac85a6116573eefc071d07d529e9e3fe8886
@@ -543,13 +543,15 @@ google_session_handle_candidates(JabberS
 		const gchar *protocol = xmlnode_get_attrib(cand, "protocol");
 		const gchar *address = xmlnode_get_attrib(cand, "address");
 		const gchar *port = xmlnode_get_attrib(cand, "port");
+		const gchar *priority = xmlnode_get_attrib(cand, "priority");
 		guint component_id;
 
 		if (cname && type && address && port) {
 			PurpleMediaCandidateType candidate_type;
-
+			guint prio = priority ? atof(priority) * 1000 : 0;
+			
 			g_snprintf(n, sizeof(n), "S%d", name++);
-
+			
 			if (g_str_equal(type, "local"))
 				candidate_type = PURPLE_MEDIA_CANDIDATE_TYPE_HOST;
 			else if (g_str_equal(type, "stun"))
@@ -573,7 +575,8 @@ google_session_handle_candidates(JabberS
 					address,
 					atoi(port));
 			g_object_set(info, "username", xmlnode_get_attrib(cand, "username"),
-					"password", xmlnode_get_attrib(cand, "password"), NULL);
+					"password", xmlnode_get_attrib(cand, "password"),
+			        "priority", prio, NULL);
 			if (!strncmp(cname, "video_", 6))
 				video_list = g_list_append(video_list, info);
 			else


More information about the Commits mailing list