diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2008-12-02 15:11:30 +0000 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2008-12-02 15:11:30 +0000 |
commit | 820608ed4d0891d806980ba0a91938f028d4f5ec (patch) | |
tree | 07cacee63f1c0443191618193e8df8775c45156f /src/tube-stream.c | |
parent | 8846da046ecfec61bbd21ad21f31c0b81f31dcff (diff) | |
download | telepathy-salut-820608ed4d0891d806980ba0a91938f028d4f5ec.tar.gz |
tube-stream: block the transport while we don't have a bytestream to transfer its data
Diffstat (limited to 'src/tube-stream.c')
-rw-r--r-- | 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 555254b1..290bde60 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. * |