aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-10-13 02:11:58 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2010-02-25 00:29:17 +0800
commit0e9bd3f5a6c19512f088993bfac8cec6aaabff7b (patch)
tree7951785ddf0b82638240de878f6b6514100cd060 /libempathy
parenteea99156d893167e6289906e4c237ad5210dbc99 (diff)
downloadgsoc2013-empathy-0e9bd3f5a6c19512f088993bfac8cec6aaabff7b.tar
gsoc2013-empathy-0e9bd3f5a6c19512f088993bfac8cec6aaabff7b.tar.gz
gsoc2013-empathy-0e9bd3f5a6c19512f088993bfac8cec6aaabff7b.tar.bz2
gsoc2013-empathy-0e9bd3f5a6c19512f088993bfac8cec6aaabff7b.tar.lz
gsoc2013-empathy-0e9bd3f5a6c19512f088993bfac8cec6aaabff7b.tar.xz
gsoc2013-empathy-0e9bd3f5a6c19512f088993bfac8cec6aaabff7b.tar.zst
gsoc2013-empathy-0e9bd3f5a6c19512f088993bfac8cec6aaabff7b.zip
If we're asked to handle a channel twice, assume it's due to user action
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-dispatcher.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/libempathy/empathy-dispatcher.c b/libempathy/empathy-dispatcher.c
index 1742455d9..d7d3b9f9a 100644
--- a/libempathy/empathy-dispatcher.c
+++ b/libempathy/empathy-dispatcher.c
@@ -578,7 +578,17 @@ dispatcher_connection_new_channel (EmpathyDispatcher *self,
}
}
- DEBUG ("New channel of type %s on %s", channel_type, object_path);
+ DEBUG ("%s channel of type %s on %s", incoming ? "incoming" : "outgoing",
+ channel_type, object_path);
+
+ if ((operation = g_hash_table_lookup (cd->dispatching_channels,
+ object_path)) != NULL)
+ {
+ /* This operation was already being dispatched, assume we got the channel
+ * again because something asked for it and approve it right away */
+ empathy_dispatch_operation_approve (operation);
+ return;
+ }
if (properties == NULL)
channel = tp_channel_new (connection, object_path, channel_type,
@@ -642,6 +652,10 @@ dispatcher_connection_new_channel (EmpathyDispatcher *self,
}
}
}
+
+ if (g_hash_table_lookup (cd->dispatched_channels, object_path) != NULL)
+ empathy_dispatch_operation_approve (operation);
+
dispatcher_start_dispatching (dispatcher, operation, cd);
}
@@ -659,7 +673,6 @@ dispatcher_connection_new_channel_with_properties (
gboolean requested;
gboolean valid;
-
channel_type = tp_asv_get_string (properties,
TP_IFACE_CHANNEL ".ChannelType");
if (channel_type == NULL)