diff options
author | Olivier CrĂȘte <olivier.crete@collabora.co.uk> | 2009-02-25 17:43:31 -0500 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.co.uk> | 2009-02-25 17:43:31 -0500 |
commit | e4ae809764c46893c0d5610a8c51008381adc385 (patch) | |
tree | 8afa4eb1a263c8af4fca99419c26c88f881870fe | |
parent | 3714dfa4ab4965be1be6d9168211f480b9e8ad16 (diff) |
Stop stream when its proxy is invalidated
-rw-r--r-- | telepathy-farsight/stream.c | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/telepathy-farsight/stream.c b/telepathy-farsight/stream.c index dfc9248..2ff2060 100644 --- a/telepathy-farsight/stream.c +++ b/telepathy-farsight/stream.c @@ -1441,15 +1441,10 @@ stop_telephony_event (TpMediaStreamHandler *proxy G_GNUC_UNUSED, WARNING (self, "stopping event failed"); } + static void -close (TpMediaStreamHandler *proxy G_GNUC_UNUSED, - gpointer user_data G_GNUC_UNUSED, - GObject *object) +tf_stream_shutdown (TfStream *self) { - TfStream *self = TF_STREAM (object); - - DEBUG (self, "close requested by connection manager"); - g_object_set (self->priv->fs_stream, "direction", FS_DIRECTION_NONE, NULL); @@ -1459,6 +1454,19 @@ close (TpMediaStreamHandler *proxy G_GNUC_UNUSED, g_signal_emit (self, signals[CLOSED], 0); } + +static void +close (TpMediaStreamHandler *proxy G_GNUC_UNUSED, + gpointer user_data G_GNUC_UNUSED, + GObject *object) +{ + TfStream *self = TF_STREAM (object); + + DEBUG (self, "close requested by connection manager"); + + tf_stream_shutdown (self); +} + static void cb_fs_recv_codecs_changed (TfStream *self, GList *codecs) @@ -1512,6 +1520,8 @@ invalidated_cb (TpMediaStreamHandler *proxy G_GNUC_UNUSED, { TfStream *stream = TF_STREAM (user_data); + DEBUG (stream, "proxy invalidated"); + if (stream->priv->stream_handler_proxy) { TpMediaStreamHandler *tmp = stream->priv->stream_handler_proxy; @@ -1519,6 +1529,8 @@ invalidated_cb (TpMediaStreamHandler *proxy G_GNUC_UNUSED, stream->priv->stream_handler_proxy = NULL; g_object_unref (tmp); } + + tf_stream_shutdown (stream); } /** |