[telepathy-qt4/master] IncomingFileTransferChannel: Read all remaining data on input device when device is closed and write to socket.

Andre Moreira Magalhaes (andrunko) andre.magalhaes at collabora.co.uk
Wed Sep 23 06:32:25 PDT 2009


---
 TelepathyQt4/outgoing-file-transfer-channel.cpp |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/TelepathyQt4/outgoing-file-transfer-channel.cpp b/TelepathyQt4/outgoing-file-transfer-channel.cpp
index ed89cda..2fb309f 100644
--- a/TelepathyQt4/outgoing-file-transfer-channel.cpp
+++ b/TelepathyQt4/outgoing-file-transfer-channel.cpp
@@ -249,10 +249,8 @@ void OutgoingFileTransferChannel::onInputAboutToClose()
 {
     debug() << "Input closed";
 
-    // in case of sequential devices, we should read everything from it and
-    // write to the socket. Let's not do this for non-sequential devices as we
-    // don't want to read a whole file into memory.
-    if (isConnected() && mPriv->input->isSequential()) {
+    // read all remaining data from input device and write to output device
+    if (isConnected()) {
         QByteArray data;
         data = mPriv->input->readAll();
         mPriv->socket->write(data); // never fails
-- 
1.5.6.5



More information about the telepathy-commits mailing list