syncmlfw/common/alertqueue/src/NSmlDSAlertParser11.cpp
branchRCL_3
changeset 26 19bba8228ff0
parent 25 b183ec05bd8c
child 27 5cc2995847ea
--- a/syncmlfw/common/alertqueue/src/NSmlDSAlertParser11.cpp	Tue Aug 31 16:04:06 2010 +0300
+++ b/syncmlfw/common/alertqueue/src/NSmlDSAlertParser11.cpp	Wed Sep 01 12:27:42 2010 +0100
@@ -24,7 +24,7 @@
 #include <barsc.h>
 #include <s32mem.h>
 #include <data_caging_path_literals.hrh>
-#include <nsmldstypesres.rsg>
+#include <NSmlDSTypesRes.rsg>
 
 #include <nsmlconstants.h>
 #include <nsmlunicodeconverter.h>
@@ -217,26 +217,27 @@
 
 	SmlMetInfMetInf_t* metInf = NULL;
 	TPtr8 mediaType( NULL, 0, 0 );
-
+	
+	if ( aAlert->itemList->item->meta )
+		{
+		if ( aAlert->itemList->item->meta->content && 
+			aAlert->itemList->item->meta->contentType == SML_PCDATA_EXTENSION && 
+			aAlert->itemList->item->meta->extension == SML_EXT_METINF )
+			{
+			metInf = (SmlMetInfMetInf_t*) aAlert->itemList->item->meta->content;
+			
+			if ( metInf->type )
+				{
+				mediaType.Set( static_cast<TUint8*>( metInf->type->content ), metInf->type->length, metInf->type->length );
+				TrimRightSpaceAndNull( mediaType );
+				}
+			}
+		}
+		
 	if ( aAlert->itemList )
 		{
 		if (aAlert->itemList->item)
-			{	
-			if ( aAlert->itemList->item->meta )
-				{
-				if ( aAlert->itemList->item->meta->content && 
-				aAlert->itemList->item->meta->contentType == SML_PCDATA_EXTENSION && 
-				aAlert->itemList->item->meta->extension == SML_EXT_METINF )
-				{
-				metInf = (SmlMetInfMetInf_t*) aAlert->itemList->item->meta->content;
-			
-				if ( metInf->type )
-					{
-					mediaType.Set( static_cast<TUint8*>( metInf->type->content ), metInf->type->length, metInf->type->length );
-					TrimRightSpaceAndNull( mediaType );
-					}
-				}
-				}
+			{
 			if ( aAlert->itemList->item->source )
 				{
 				HBufC8* remotePath = NULL;
@@ -252,7 +253,7 @@
 					}
 							
 				CleanupStack::PopAndDestroy(); // remotePath	
-    		}
+    			}
 			}
 		}