email/imap4mtm/imapsession/src/cimapbodystructurebuilder.cpp
changeset 52 12db4185673b
parent 0 72b543305e3a
equal deleted inserted replaced
44:36f374c67aa8 52:12db4185673b
   214 			case EParseBodyTypeMessageRfc822:
   214 			case EParseBodyTypeMessageRfc822:
   215 				{
   215 				{
   216 				// Found a "MESSAGE/RFC822" body structure.
   216 				// Found a "MESSAGE/RFC822" body structure.
   217 				// This contains an embedded bodystructure, so parse up to the structure,
   217 				// This contains an embedded bodystructure, so parse up to the structure,
   218 				// and then allow the loop to parse the embedded structure.
   218 				// and then allow the loop to parse the embedded structure.
   219 				ParseBodyTypeMessageRfc822L();
   219 				TRAPD(err, ParseBodyTypeMessageRfc822L());
   220 				parseStep = EParseNewBodyStructure;
   220 				if(err == KErrImapCorrupt)
       
   221 				    {
       
   222 				parseStep =EParseRemainderMessageRfc822;
       
   223 				    }
       
   224 				else
       
   225 				    {
       
   226                     parseStep = EParseNewBodyStructure;
       
   227 				    }
       
   228 				
   221 				}
   229 				}
   222 				break;
   230 				break;
   223 			case EParseRemainderMessageRfc822:
   231 			case EParseRemainderMessageRfc822:
   224 				{
   232 				{
   225 				// Just finished parsing the embedded bodystructure of a "MESSAGE/RFC822".
   233 				// Just finished parsing the embedded bodystructure of a "MESSAGE/RFC822".
   518 */
   526 */
   519 void CImapBodyStructureBuilder::ParseBodyTypeMessageRfc822L()
   527 void CImapBodyStructureBuilder::ParseBodyTypeMessageRfc822L()
   520 	{
   528 	{
   521 	// body-fields SP SP body SP body-fld-lines
   529 	// body-fields SP SP body SP body-fld-lines
   522 	ParseBodyFieldsL();
   530 	ParseBodyFieldsL();
   523 	
   531     TRAPD(err, ParseEnvelopeL());
   524 	// envelope
   532    
   525 	ParseEnvelopeL();
   533     // Expect a body substructure next.
   526 	
   534     // Position iAtomWalker at the opening bracket, ready for ParseBodyStructureTypeL
   527 	// Expect a body substructure next.
   535     iAtomWalker->WalkAcrossL(ETrue);
   528 	// Position iAtomWalker at the opening bracket, ready for ParseBodyStructureTypeL
   536     if(err == KErrImapCorrupt)
   529 	iAtomWalker->WalkAcrossL(ETrue);
   537         CImapCommand::CorruptDataL(iLogId);
   530 	}
   538 	}
   531 
   539 
   532 /**
   540 /**
   533 body-type-msg = media-message SP body-fields SP envelope SP body SP body-fld-lines
   541 body-type-msg = media-message SP body-fields SP envelope SP body SP body-fld-lines
   534 
   542