[Telepathy-commits] [telepathy-salut/master] tube-stream: block the transport while we don't have a bytestream to transfer its data
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Tue Dec 2 07:11:30 PST 2008
---
src/tube-stream.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/tube-stream.c b/src/tube-stream.c
index 555254b..290bde6 100644
--- a/src/tube-stream.c
+++ b/src/tube-stream.c
@@ -307,6 +307,9 @@ add_transport (SalutTubeStream *self,
G_CALLBACK (transport_disconnected_cb), self);
g_signal_connect (transport, "buffer-empty",
G_CALLBACK (transport_buffer_empty_cb), self);
+
+ /* We can transfer transport's data; unblock it. */
+ gibber_transport_block_receiving (transport, FALSE);
}
static void
@@ -598,6 +601,10 @@ local_new_connection_cb (GibberListener *listener,
SalutTubeStream *self = SALUT_TUBE_STREAM (user_data);
SalutTubeStreamPrivate *priv = SALUT_TUBE_STREAM_GET_PRIVATE (self);
+ /* Block the transport while there is no open bytestream to transfer
+ * its data. */
+ gibber_transport_block_receiving (transport, TRUE);
+
/* Streams in MUC tubes are established with stream initiation (XEP-0095).
* We use SalutSiBytestreamManager.
*
--
1.5.6.5
More information about the Telepathy-commits
mailing list