aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-event-manager.c
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-01-10 00:16:02 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2009-01-10 00:16:02 +0800
commita2c51caa1ffb0bdd4c95d4d45fc442dbf91b27c7 (patch)
tree2c5b0ff68d4dcd07f81c29ecc8971bafa6400069 /src/empathy-event-manager.c
parentfe6101ebb054551b06c86f9c3b8bd31780264987 (diff)
downloadgsoc2013-empathy-a2c51caa1ffb0bdd4c95d4d45fc442dbf91b27c7.tar.gz
gsoc2013-empathy-a2c51caa1ffb0bdd4c95d4d45fc442dbf91b27c7.tar.zst
gsoc2013-empathy-a2c51caa1ffb0bdd4c95d4d45fc442dbf91b27c7.zip
Handle Dbus Tubes and ignore non p2p channels
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> svn path=/trunk/; revision=2199
Diffstat (limited to 'src/empathy-event-manager.c')
-rw-r--r--src/empathy-event-manager.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c
index 7643ad735..0b42cb109 100644
--- a/src/empathy-event-manager.c
+++ b/src/empathy-event-manager.c
@@ -461,10 +461,12 @@ event_manager_approve_channel_cb (EmpathyDispatcher *dispatcher,
g_object_unref (factory);
g_object_unref (account);
}
- else if (!tp_strdiff (channel_type, EMP_IFACE_CHANNEL_TYPE_STREAM_TUBE))
+ else if (!tp_strdiff (channel_type, EMP_IFACE_CHANNEL_TYPE_STREAM_TUBE) ||
+ !tp_strdiff (channel_type, EMP_IFACE_CHANNEL_TYPE_DBUS_TUBE))
{
EmpathyContact *contact;
TpHandle handle;
+ TpHandleType handle_type;
McAccount *account;
EmpathyContactFactory *factory;
EmpathyTubeDispatch *tube_dispatch;
@@ -472,8 +474,13 @@ event_manager_approve_channel_cb (EmpathyDispatcher *dispatcher,
channel = empathy_dispatch_operation_get_channel (operation);
+ handle = tp_channel_get_handle (channel, &handle_type);
+
+ /* Only understand p2p tubes */
+ if (handle_type != TP_HANDLE_TYPE_CONTACT)
+ return;
+
factory = empathy_contact_factory_new ();
- handle = tp_channel_get_handle (channel, NULL);
account = empathy_channel_get_account (channel);
contact = empathy_contact_factory_get_from_handle (factory, account,