]> git.0d.be Git - empathy.git/blobdiff - libempathy/empathy-filter.c
Merge call branch from Elliot Fairweather with cleanups from Xavier Claessens.
[empathy.git] / libempathy / empathy-filter.c
index d916b60ddeca45f9d331c6c6591540f408269a21..fb8a5208eb8913eaa2ce236bbcdeea433d968d73 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>
  */
@@ -79,7 +78,7 @@ empathy_filter_class_init (EmpathyFilterClass *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);
 
@@ -89,7 +88,7 @@ empathy_filter_class_init (EmpathyFilterClass *klass)
                              G_SIGNAL_RUN_LAST,
                              0,
                              NULL, NULL,
-                             empathy_marshal_VOID__UINT_BOOLEAN,
+                             _empathy_marshal_VOID__UINT_BOOLEAN,
                              G_TYPE_NONE,
                              2, G_TYPE_UINT, G_TYPE_BOOLEAN);
 
@@ -215,9 +214,15 @@ empathy_filter_filter_channel (EmpathyFilter  *filter,
 
        priv = GET_PRIV (filter);
 
-       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,
@@ -228,7 +233,9 @@ empathy_filter_filter_channel (EmpathyFilter  *filter,
 
        g_hash_table_insert (priv->table, tp_chan, GUINT_TO_POINTER (id));
 
-       empathy_debug (DEBUG_DOMAIN, "New channel to be filtred: %d", id);
+       empathy_debug (DEBUG_DOMAIN, "New channel to be filtred: "
+                                    "type=%s handle=%d id=%d",
+                                    channel_type, handle, id);
        g_signal_emit (filter, signals[NEW_CHANNEL], 0, tp_conn, tp_chan);
 
        g_object_unref (tp_conn);