email/imap4mtm/imapsession/src/cimapbodystructurebuilder.cpp
branchRCL_3
changeset 20 94cccd85bd25
parent 0 72b543305e3a
child 26 ebe688cedc25
equal deleted inserted replaced
19:7e4e4bcc75b6 20:94cccd85bd25
   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 	//Sometime RFCb22  message has empty evvelopel, in that case we are traping this and  processed.
   524 	// envelope
   532     TRAPD(err, ParseEnvelopeL());
   525 	ParseEnvelopeL();
   533    
   526 	
   534     // Expect a body substructure next.
   527 	// Expect a body substructure next.
   535     // Position iAtomWalker at the opening bracket, ready for ParseBodyStructureTypeL
   528 	// Position iAtomWalker at the opening bracket, ready for ParseBodyStructureTypeL
   536     iAtomWalker->WalkAcrossL(ETrue);
   529 	iAtomWalker->WalkAcrossL(ETrue);
   537     if(err == KErrImapCorrupt)
       
   538         CImapCommand::CorruptDataL(iLogId);
   530 	}
   539 	}
   531 
   540 
   532 /**
   541 /**
   533 body-type-msg = media-message SP body-fields SP envelope SP body SP body-fld-lines
   542 body-type-msg = media-message SP body-fields SP envelope SP body SP body-fld-lines
   534 
   543