diff options
author | Vincent Richard <[email protected]> | 2012-12-05 20:02:34 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2012-12-05 20:02:34 +0000 |
commit | 053d2b4ee0712a3de57c2dd1228c28a23d0a0c02 (patch) | |
tree | 50739ebc2dea1357496b7aff17031b47699e6cca | |
parent | Use message size for progress listener. (diff) | |
download | vmime-053d2b4ee0712a3de57c2dd1228c28a23d0a0c02.tar.gz vmime-053d2b4ee0712a3de57c2dd1228c28a23d0a0c02.zip |
Fixed progression notification when message size is lower than 64K.
-rw-r--r-- | src/net/pop3/POP3Store.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/net/pop3/POP3Store.cpp b/src/net/pop3/POP3Store.cpp index f8a8ec0a..749c5dea 100644 --- a/src/net/pop3/POP3Store.cpp +++ b/src/net/pop3/POP3Store.cpp @@ -893,10 +893,19 @@ void POP3Store::readResponse(utility::outputStream& os, if (m_timeoutHandler) m_timeoutHandler->resetTimeOut(); + // Notify progress + current += read; + + if (progress) + { + total = std::max(total, current); + progress->progress(current, total); + } + // If we don't have extracted the response code yet if (!codeDone) { - temp += string(buffer, read); + temp.append(buffer, read); string firstLine; @@ -917,14 +926,6 @@ void POP3Store::readResponse(utility::outputStream& os, { // Inject the data into the output stream os.write(buffer, read); - current += read; - - // Notify progress - if (progress) - { - total = std::max(total, current); - progress->progress(current, total); - } } } |