pidgin: 903af328: Generate the "preference" attribute corr...
malu at pidgin.im
malu at pidgin.im
Mon Sep 28 14:16:37 EDT 2009
-----------------------------------------------------------------
Revision: 903af32836ce489b57aec5f255ba91e9e675526f
Ancestor: 863068e2c2ffea9391d909e6dbc73f2a00f828f9
Author: malu at pidgin.im
Date: 2009-09-28T18:11:28
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/903af32836ce489b57aec5f255ba91e9e675526f
Modified files:
libpurple/protocols/jabber/google.c
ChangeLog:
Generate the "preference" attribute correctly for candidates on locales
where the decimal separator is ,
-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/google.c 940c05f135865736e51fa0311197d6591352d1e6
+++ libpurple/protocols/jabber/google.c 0f2d813acefad8eb343eac7f2d7a5fd6935940f9
@@ -104,7 +104,8 @@ google_session_send_candidates(PurpleMed
for (;candidates;candidates = candidates->next) {
JabberIq *iq;
- gchar *ip, *port, *pref, *username, *password;
+ gchar *ip, *port, *username, *password;
+ gchar pref[16];
PurpleMediaCandidateType type;
xmlnode *sess;
xmlnode *candidate;
@@ -123,9 +124,8 @@ google_session_send_candidates(PurpleMed
ip = purple_media_candidate_get_ip(transport);
port = g_strdup_printf("%d",
purple_media_candidate_get_port(transport));
- pref = g_strdup_printf("%f",
- purple_media_candidate_get_priority(transport)
- /1000.0);
+ g_ascii_dtostr(pref, 16,
+ purple_media_candidate_get_priority(transport) / 1000.0);
username = purple_media_candidate_get_username(transport);
password = purple_media_candidate_get_password(transport);
type = purple_media_candidate_get_candidate_type(transport);
@@ -163,7 +163,6 @@ google_session_send_candidates(PurpleMed
g_free(ip);
g_free(port);
- g_free(pref);
g_free(username);
g_free(password);
More information about the Commits
mailing list