aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2005-10-02 17:09:22 +0000
committerVincent Richard <[email protected]>2005-10-02 17:09:22 +0000
commit4519ae7c10ae31ff0f259371131a25e10d2e7495 (patch)
tree74e213d2f46f6767da7fd13af0d2ec50f68d0fa1
parentUpdated FSF address. (diff)
downloadvmime-4519ae7c10ae31ff0f259371131a25e10d2e7495.tar.gz
vmime-4519ae7c10ae31ff0f259371131a25e10d2e7495.zip
Fixed bug when response text is empty.
-rw-r--r--vmime/net/imap/IMAPParser.hpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/vmime/net/imap/IMAPParser.hpp b/vmime/net/imap/IMAPParser.hpp
index e52b23d4..d88fcf6e 100644
--- a/vmime/net/imap/IMAPParser.hpp
+++ b/vmime/net/imap/IMAPParser.hpp
@@ -1738,10 +1738,17 @@ public:
else
{
IMAPParser::text* text2 =
- parser.get <IMAPParser::text>(line, &pos);
+ parser.get <IMAPParser::text>(line, &pos, true);
- m_text = text2->value();
- delete (text2);
+ if (text2 != NULL)
+ {
+ m_text = text2->value();
+ delete (text2);
+ }
+ else
+ {
+ // Empty response text
+ }
}
*currentPos = pos;
@@ -5016,6 +5023,8 @@ public:
{
if (!m_timeoutHandler->handleTimeOut())
throw exceptions::operation_timed_out();
+
+ m_timeoutHandler->resetTimeOut();
}
// Receive data from the socket