[telepathy-gabble/master] Make 'resource' override a resource in 'account'

Will Thompson will.thompson at collabora.co.uk
Tue Dec 8 03:27:32 PST 2009


This way round makes more sense to me and (empirically) to #telepathy.
---
 src/connection-manager.c |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/src/connection-manager.c b/src/connection-manager.c
index 9e798d0..68cfce4 100644
--- a/src/connection-manager.c
+++ b/src/connection-manager.c
@@ -289,6 +289,15 @@ _gabble_connection_manager_new_connection (TpBaseConnectionManager *self,
                        "password",           params->password,
                        NULL);
 
+  /* split up account into username, stream-server and resource */
+  if (!_gabble_connection_set_properties_from_account (conn, params->account,
+        error))
+    {
+      g_object_unref (G_OBJECT (conn));
+      conn = NULL;
+      goto out;
+    }
+
   SET_PROPERTY_IF_PARAM_SET ("connect-server", JABBER_PARAM_SERVER,
                              params->server);
   SET_PROPERTY_IF_PARAM_SET ("resource", JABBER_PARAM_RESOURCE,
@@ -329,13 +338,6 @@ _gabble_connection_manager_new_connection (TpBaseConnectionManager *self,
   SET_PROPERTY_IF_PARAM_SET ("keepalive-interval",
       JABBER_PARAM_KEEPALIVE_INTERVAL, params->keepalive_interval);
 
-  /* split up account into username, stream-server and resource */
-  if (!_gabble_connection_set_properties_from_account (conn, params->account,
-        error))
-    {
-      g_object_unref (G_OBJECT (conn));
-      conn = NULL;
-    }
-
+out:
   return (TpBaseConnection *) conn;
 }
-- 
1.5.6.5




More information about the telepathy-commits mailing list