Mercurial > pidgin
changeset 30485:e97788414900
jabber: set priority on remote candidates for Google-style vv
author | Marcus Lundblad <ml@update.uu.se> |
---|---|
date | Sat, 04 Sep 2010 15:47:59 +0000 |
parents | 64cb8836133e |
children | 54461ce5f7e0 e126e263be18 |
files | libpurple/protocols/jabber/google/google_session.c |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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