# HG changeset patch # User Marcus Lundblad # Date 1283615279 0 # Node ID e977884149007834666e3e93fadc9051ec96b9d6 # Parent 64cb8836133e5bb9e038868c9c0fd08859ee6680 jabber: set priority on remote candidates for Google-style vv diff -r 64cb8836133e -r e97788414900 libpurple/protocols/jabber/google/google_session.c --- a/libpurple/protocols/jabber/google/google_session.c Fri Sep 03 20:08:14 2010 +0000 +++ b/libpurple/protocols/jabber/google/google_session.c Sat Sep 04 15:47:59 2010 +0000 @@ -543,13 +543,15 @@ 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 @@ 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