[telepathy-gabble/master] Multiply candidate preference by 65536
Will Thompson
will.thompson at collabora.co.uk
Sun Jun 28 08:25:22 PDT 2009
tp-fs divides the priority by 65536 before handing it to the CM (in
gtalk-p2p we send a float over the wire), so if we multiply it by 65536
we get back to where we started.
---
src/jingle-transport-iceudp.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/src/jingle-transport-iceudp.c b/src/jingle-transport-iceudp.c
index 57598af..1ea115f 100644
--- a/src/jingle-transport-iceudp.c
+++ b/src/jingle-transport-iceudp.c
@@ -385,10 +385,7 @@ inject_candidates (GabbleJingleTransportIface *obj,
break;
}
- /* FIXME: We're probably horribly wrong about our usage of
- * priority wrt ICE-UDP draft. Seems to work, though, probably
- * everyone ignores it at the moment. */
- sprintf (pref_str, "%d", (int) (1000.0 * c->preference));
+ sprintf (pref_str, "%d", (int) (65536.0 * c->preference));
sprintf (port_str, "%d", c->port);
sprintf (comp_str, "%d", c->component);
sprintf (found_str, "%d", priv->foundation_sequence++);
--
1.5.6.5
More information about the telepathy-commits
mailing list