ncdengine/provider/server/src/ncdsearchoperationimpl.cpp
branchRCL_3
changeset 25 7333d7932ef7
parent 0 ba25891c3a9e
child 26 8b7f4e561641
--- a/ncdengine/provider/server/src/ncdsearchoperationimpl.cpp	Thu Aug 19 10:02:49 2010 +0300
+++ b/ncdengine/provider/server/src/ncdsearchoperationimpl.cpp	Tue Aug 31 15:21:33 2010 +0300
@@ -724,53 +724,48 @@
         delete metaIdentifier;
         metaIdentifier = NULL;
         }
-    if( addMetaData )
+
+    // set iParentIdentifier as parent if not set otherwise, this would be the case of a
+    // normal top-level node from a content source
+    if ( ! parentIdentifier ) 
         {
-        // set iParentIdentifier as parent if not set otherwise, this would be the case of a
-        // normal top-level node from a content source
-        if ( ! parentIdentifier ) 
-            {
-            parentIdentifier = CNcdNodeIdentifier::NewLC( *iParentIdentifier );
-            }
-        
-        // Get the node reference from the data handler.
-        // The node has the given parent and its metadata
-        // will be internalized with the given data.
-        CNcdNode& node =
-            iNodeManager->DataHandlerL( *parentIdentifier, *aData, iClientUid );
-            
-        CleanupStack::PopAndDestroy( parentIdentifier );
+        parentIdentifier = CNcdNodeIdentifier::NewLC( *iParentIdentifier );
+        }
+    
+    // Get the node reference from the data handler.
+    // The node has the given parent and its metadata
+    // will be internalized with the given data.
+    CNcdNode& node =
+    iNodeManager->DataHandlerL( *parentIdentifier, *aData, iClientUid );
+    
+    CleanupStack::PopAndDestroy( parentIdentifier );
 
-        // Notice that the loaded nodes should contain the actual node identifier
-        // instead of metadata identifier, because the identifiers are returned to
-        // the proxy side after operation completes.
-        CNcdNodeIdentifier* loadedNodeId = 
-            CNcdNodeIdentifier::NewLC( node.Identifier() );
-        iLoadedNodes.AppendL( loadedNodeId );
-        CleanupStack::Pop( loadedNodeId );        
+    // Notice that the loaded nodes should contain the actual node identifier
+    // instead of metadata identifier, because the identifiers are returned to
+    // the proxy side after operation completes.
+    CNcdNodeIdentifier* loadedNodeId = 
+        CNcdNodeIdentifier::NewLC( node.Identifier() );
+    iLoadedNodes.AppendL( loadedNodeId );
+    CleanupStack::Pop( loadedNodeId );        
 
-        // If the data contains icon id and datablock id, they are stored until
-        // the datablock arrives later.
-        const MNcdPreminetProtocolIcon* icon = aData->Icon();
-        if ( icon != NULL ) 
+    // If the data contains icon id and datablock id, they are stored until
+    // the datablock arrives later.
+    const MNcdPreminetProtocolIcon* icon = aData->Icon();
+    if ( icon != NULL ) 
+        {
+        const TDesC& iconId = icon->Id();
+        const TDesC& dataBlockId = icon->DataBlock();
+        if ( iconId != KNullDesC && dataBlockId != KNullDesC ) 
             {
-            const TDesC& iconId = icon->Id();
-            const TDesC& dataBlockId = icon->DataBlock();
-            if ( iconId != KNullDesC && dataBlockId != KNullDesC ) 
-                {
-                // The node metadata was created by using the DataHandlerL
-                // and inserted for the node.
-                // So, the metadata can be asked from the node now.
-                MapIconIdForDataBlockL(iconId, dataBlockId, 
-                                       node.NodeMetaDataL().Identifier() );
-                node.NodeMetaDataL().IconL().SetIconDataReady( EFalse );
-                }
+            // The node metadata was created by using the DataHandlerL
+            // and inserted for the node.
+            // So, the metadata can be asked from the node now.
+            MapIconIdForDataBlockL(iconId, dataBlockId, 
+                                   node.NodeMetaDataL().Identifier() );
+            node.NodeMetaDataL().IconL().SetIconDataReady( EFalse );
             }
         }
-    else if ( parentIdentifier )
-        {
-        CleanupStack::PopAndDestroy( parentIdentifier );
-        }
+    
     DLTRACEOUT((""));
     }