cmmanager/cmmgr/cmmserver/src/cmmdestinationinstance.cpp
changeset 66 ed07dcc72692
parent 53 4af712113915
--- a/cmmanager/cmmgr/cmmserver/src/cmmdestinationinstance.cpp	Fri Sep 17 08:32:43 2010 +0300
+++ b/cmmanager/cmmgr/cmmserver/src/cmmdestinationinstance.cpp	Mon Oct 04 00:43:42 2010 +0300
@@ -460,9 +460,16 @@
             break;
         case CMManager::ESnapPurposeIntranet:
             {
-            _LIT( KDestinationTextId, "txt_occ_dblist_intranet");
-            resolvedText = CCmManagerTextResolver::ResolveTextL( KDestinationTextId );
-            isLocalised = ETrue;
+            // Intranet is handled in a special way. If localised metadata is OFF
+            // destination's network record name is returned
+            TUint32 localized( 0 );
+            GetMetadataL( CMManager::ESnapMetadataDestinationIsLocalised, localized );
+            if ( localized )
+                {
+                _LIT( KDestinationTextId, "txt_occ_dblist_intranet");
+                resolvedText = CCmManagerTextResolver::ResolveTextL( KDestinationTextId );
+                isLocalised = ETrue;
+                }
             }
             break;
         default:
@@ -1631,15 +1638,10 @@
         User::Leave( KErrArgument );
         }
 
-    TUint32 temp = ~(
-            CMManager::ESnapMetadataInternet |
-            CMManager::ESnapMetadataDestinationIsLocalised |
-            CMManager::ESnapMetadataPurpose );
     if ( aMetadata == CMManager::ENotLocalisedDest )
         {
-        // Clear old ESnapMetadataInternet-bit,
-        // ESnapMetadataDestinationIsLocalised-bits and ESnapMetadataPurpose-bits.
-        iMetadataRecord->iMetadata = iMetadataRecord->iMetadata & temp;
+        // Clear old ESnapMetadataDestinationIsLocalised-bits.
+        iMetadataRecord->iMetadata = iMetadataRecord->iMetadata & ~( CMManager::ESnapMetadataDestinationIsLocalised );
         }
     else
         {
@@ -1648,6 +1650,11 @@
             User::Leave( KErrAlreadyExists );
             }
 
+        TUint32 temp = ~(
+                CMManager::ESnapMetadataInternet |
+                CMManager::ESnapMetadataDestinationIsLocalised |
+                CMManager::ESnapMetadataPurpose );
+
         // Clear old ESnapMetadataInternet-bit,
         // ESnapMetadataDestinationIsLocalised-bits and ESnapMetadataPurpose-bits.
         TUint32 value = iMetadataRecord->iMetadata & temp;