[Telepathy-commits] [telepathy-gabble/master] GabbleJingleContent: use proper accessors to find transport GTypes

Simon McVittie simon.mcvittie at collabora.co.uk
Wed Feb 25 04:34:37 PST 2009


---
 src/jingle-content.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/jingle-content.c b/src/jingle-content.c
index 027f813..065c45e 100644
--- a/src/jingle-content.c
+++ b/src/jingle-content.c
@@ -236,9 +236,8 @@ gabble_jingle_content_set_property (GObject *object,
 
       if (priv->transport_ns != NULL)
         {
-          GType transport_type = GPOINTER_TO_SIZE (
-              g_hash_table_lookup (self->conn->jingle_factory->transports,
-                  priv->transport_ns));
+          GType transport_type = gabble_jingle_factory_lookup_transport (
+              self->conn->jingle_factory, priv->transport_ns);
 
           g_assert (transport_type != 0);
 
@@ -507,8 +506,8 @@ gabble_jingle_content_parse_add (GabbleJingleContent *c,
 
           dialect = JINGLE_DIALECT_GTALK3;
           g_object_set (c->session, "dialect", JINGLE_DIALECT_GTALK3, NULL);
-          transport_type = GPOINTER_TO_SIZE (
-              g_hash_table_lookup (c->conn->jingle_factory->transports, ""));
+          transport_type = gabble_jingle_factory_lookup_transport (
+              c->conn->jingle_factory, "");
           priv->transport_ns = g_strdup ("");
         }
     }
@@ -526,8 +525,8 @@ gabble_jingle_content_parse_add (GabbleJingleContent *c,
     {
       const gchar *ns = lm_message_node_get_namespace (trans_node);
 
-      transport_type = GPOINTER_TO_SIZE (
-          g_hash_table_lookup (c->conn->jingle_factory->transports, ns));
+      transport_type = gabble_jingle_factory_lookup_transport (
+          c->conn->jingle_factory, ns);
 
       if (transport_type == 0)
         {
-- 
1.5.6.5




More information about the telepathy-commits mailing list