[Telepathy-commits] [telepathy-gabble/master] tube-dbus: call add_yourself_in_dbus_names when the tube is open and not when it's offered
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Wed Feb 4 08:33:14 PST 2009
---
src/tubes-channel.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/src/tubes-channel.c b/src/tubes-channel.c
index 58ad316..bd89113 100644
--- a/src/tubes-channel.c
+++ b/src/tubes-channel.c
@@ -477,8 +477,17 @@ tube_opened_cb (GabbleTubeIface *tube,
{
GabbleTubesChannel *self = GABBLE_TUBES_CHANNEL (user_data);
guint tube_id;
+ TpTubeType type;
- g_object_get (tube, "id", &tube_id, NULL);
+ g_object_get (tube,
+ "id", &tube_id,
+ "type", &type,
+ NULL);
+
+ if (type == TP_TUBE_TYPE_DBUS)
+ {
+ add_yourself_in_dbus_names (self, tube_id);
+ }
tp_svc_channel_type_tubes_emit_tube_state_changed (self, tube_id,
TP_TUBE_STATE_OPEN);
@@ -516,11 +525,6 @@ tube_offered_cb (GabbleTubeIface *tube,
update_tubes_presence (self);
- if (type == TP_TUBE_TYPE_DBUS)
- {
- add_yourself_in_dbus_names (self, tube_id);
- }
-
g_free (service);
g_hash_table_destroy (parameters);
}
--
1.5.6.5
More information about the telepathy-commits
mailing list