diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-07-05 14:02:29 +0200 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-07-05 14:18:24 +0200 |
commit | 35ff9454674f766d5d8f89286b1092b44868dda4 (patch) | |
tree | a18f70205882d6de9918e9019821dde7e1909ef2 | |
parent | cd3d4fce75d731ac98037dc3c87b566ffd1998e0 (diff) | |
download | telepathy-logger-35ff9454674f766d5d8f89286b1092b44868dda4.tar.gz |
observer: ignore channels that we are already observing
telepathy-idle announce twice channels we receive from the bouncer. That's a
bug (fdo #28918) but as a result ObserveChannels() is called twice.
We should ignore those rather than creating a second TplChannel which would
destroy the one we just created.
-rw-r--r-- | telepathy-logger/observer.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/telepathy-logger/observer.c b/telepathy-logger/observer.c index 2833a3e..c229707 100644 --- a/telepathy-logger/observer.c +++ b/telepathy-logger/observer.c @@ -176,6 +176,12 @@ tpl_observer_observe_channels (TpBaseClient *client, const gchar *path; path = tp_proxy_get_object_path (channel); + + /* Ignore channel if we are already observing it */ + if (g_hash_table_lookup (self->priv->channels, path) != NULL || + g_hash_table_lookup (self->priv->preparing_channels, path) != NULL) + continue; + /* d.bus.propertyName.str/gvalue hash */ prop_map = tp_channel_borrow_immutable_properties (channel); chan_type = tp_channel_get_channel_type (channel); |