diff options
author | Olivier CrĂȘte <olivier.crete@collabora.com> | 2012-03-18 16:55:41 -0400 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2012-03-18 16:55:41 -0400 |
commit | c4880f4fa3118b57ac007aab54ee5201c471136b (patch) | |
tree | dff682c62c7d2263a642e02a9f8d240f1bd76343 /telepathy-farstream | |
parent | b707a6c14e96155c225af1ba1ed70ffe473c0ddd (diff) |
Release resources when destroying TfCallStream
Diffstat (limited to 'telepathy-farstream')
-rw-r--r-- | telepathy-farstream/call-stream.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/telepathy-farstream/call-stream.c b/telepathy-farstream/call-stream.c index 6a2177536..4d17f4fac 100644 --- a/telepathy-farstream/call-stream.c +++ b/telepathy-farstream/call-stream.c @@ -97,7 +97,20 @@ _tf_call_stream_destroy (TfCallStream *self) self->proxy = NULL; if (self->fsstream) - _tf_call_content_put_fsstream (self->call_content, self->fsstream); + { + g_object_set (self->fsstream, "direction", FS_DIRECTION_NONE, NULL); + + if (self->has_send_resource) + _tf_content_stop_sending (TF_CONTENT (self->call_content)); + self->has_send_resource = FALSE; + + if (self->has_receive_resource) + _tf_content_stop_receiving (TF_CONTENT (self->call_content), + &self->contact_handle, 1); + self->has_receive_resource = FALSE; + _tf_call_content_put_fsstream (self->call_content, self->fsstream); + } + self->fsstream = NULL; if (self->endpoint) |