Fixed bug when response text is empty.

This commit is contained in:
Vincent Richard 2005-10-02 17:09:22 +00:00
parent cbd1110a4b
commit 4519ae7c10

View File

@ -1738,10 +1738,17 @@ public:
else else
{ {
IMAPParser::text* text2 = IMAPParser::text* text2 =
parser.get <IMAPParser::text>(line, &pos); parser.get <IMAPParser::text>(line, &pos, true);
m_text = text2->value(); if (text2 != NULL)
delete (text2); {
m_text = text2->value();
delete (text2);
}
else
{
// Empty response text
}
} }
*currentPos = pos; *currentPos = pos;
@ -5016,6 +5023,8 @@ public:
{ {
if (!m_timeoutHandler->handleTimeOut()) if (!m_timeoutHandler->handleTimeOut())
throw exceptions::operation_timed_out(); throw exceptions::operation_timed_out();
m_timeoutHandler->resetTimeOut();
} }
// Receive data from the socket // Receive data from the socket