]> git.0d.be Git - empathy.git/blobdiff - libempathy/empathy-chandler.c
Do not load avatar from cache if token is empty. Fixes bug #517098.
[empathy.git] / libempathy / empathy-chandler.c
index 9bef4b1e1cfe6e184c0e27b470dc60e32e5edbc6..a91e55dc9f486cc98d10d2c51005286ff3122d41 100644 (file)
@@ -2,20 +2,19 @@
 /*
  * Copyright (C) 2007 Collabora Ltd.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
  *
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
+ * Lesser General Public License for more details.
  *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  * 
  * Authors: Xavier Claessens <xclaesse@gmail.com>
  */
@@ -63,7 +62,7 @@ empathy_chandler_class_init (EmpathyChandlerClass *klass)
                              G_SIGNAL_RUN_LAST,
                              0,
                              NULL, NULL,
-                             empathy_marshal_VOID__OBJECT_OBJECT,
+                             _empathy_marshal_VOID__OBJECT_OBJECT,
                              G_TYPE_NONE,
                              2, TELEPATHY_CONN_TYPE, TELEPATHY_CHAN_TYPE);
 }
@@ -130,9 +129,14 @@ empathy_chandler_handle_channel (EmpathyChandler  *chandler,
        TpChan *tp_chan;
        TpConn *tp_conn;
 
-       tp_conn = tp_conn_new (tp_get_bus (),
-                              bus_name,
-                              connection);
+       tp_conn = tp_conn_new_without_connect (tp_get_bus (),
+                                              bus_name,
+                                              connection,
+                                              NULL,
+                                              error);
+       if (!tp_conn) {
+               return FALSE;
+       }
 
        tp_chan = tp_chan_new (tp_get_bus(),
                               bus_name,
@@ -141,6 +145,9 @@ empathy_chandler_handle_channel (EmpathyChandler  *chandler,
                               handle_type,
                               handle);
 
+       empathy_debug (DEBUG_DOMAIN, "New channel to be handled: "
+                                    "type=%s handle=%d",
+                                    channel_type, handle);
        g_signal_emit (chandler, signals[NEW_CHANNEL], 0, tp_conn, tp_chan);
 
        g_object_unref (tp_chan);