[Pkg-owncloud-commits] [owncloud-client] 04/27: propagator_qnam: Avoid using too much memory

Sandro Knauß hefee-guest at moszumanska.debian.org
Tue Jul 29 16:23:58 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 82c254fecf8d3708c256d9d3afac9af720f17aab
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Tue Jul 8 15:30:53 2014 +0200

    propagator_qnam: Avoid using too much memory
    
    The idea here was that the buffer would be maximum 8KiB, not minimum.
---
 src/mirall/propagator_qnam.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mirall/propagator_qnam.cpp b/src/mirall/propagator_qnam.cpp
index 303034d..ea7b443 100644
--- a/src/mirall/propagator_qnam.cpp
+++ b/src/mirall/propagator_qnam.cpp
@@ -427,7 +427,7 @@ void GETFileJob::slotMetaDataChanged()
 
 void GETFileJob::slotReadyRead()
 {
-    int bufferSize = qMax(1024*8ll , reply()->bytesAvailable());
+    int bufferSize = qMin(1024*8ll , reply()->bytesAvailable());
     QByteArray buffer(bufferSize, Qt::Uninitialized);
 
     while(reply()->bytesAvailable() > 0) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list