omadm/omadmextensions/adapters/connmoadapter/src/NapBranch.cpp
changeset 2 a5fecba4b1e4
parent 1 4490afcb47b1
equal deleted inserted replaced
1:4490afcb47b1 2:a5fecba4b1e4
  1190     else
  1190     else
  1191         {
  1191         {
  1192         // Sanity check: If the dynamic name of the NAP node has is the same as deleted previously and
  1192         // Sanity check: If the dynamic name of the NAP node has is the same as deleted previously and
  1193         // DM Framework hasn't updated the tree, it will give the LUID when calling this method. Thus,
  1193         // DM Framework hasn't updated the tree, it will give the LUID when calling this method. Thus,
  1194         // it's needed to check that the connection method really exists.
  1194         // it's needed to check that the connection method really exists.
  1195         RCmConnectionMethodExt cm;        
  1195         TBuf8<KSmlMaxURISegLen> parentLUID;
  1196 
  1196         parentLUID.Zero();
  1197         if ( !GetConnectionMethodLC( *iCmManager, cm,  CUtils::IntLUID( aParentLUID) ) )
  1197         parentLUID = aParentLUID;
  1198             {
  1198         RCmConnectionMethodExt cm;               
  1199             // New node, add to buffer
  1199         if ( !GetConnectionMethodLC( *iCmManager, cm,  CUtils::IntLUID( parentLUID) ) )
       
  1200             {            
       
  1201 			if(aParentLUID.Length() > 0)
       
  1202 				{
       
  1203 				TInt ret = iCallback->RemoveMappingL(KConnMoAdapterUid,
       
  1204 							GetDynamicNAPNodeUri( aURI ), ETrue );
       
  1205 				if(ret)
       
  1206 					{
       
  1207 					iCallback->SetStatusL( aStatusRef, CSmlDmAdapter::EError );
       
  1208 					CleanupStack::PopAndDestroy( &cm );
       
  1209 					return;
       
  1210 					}				
       
  1211 				}
       
  1212 			// New node, add to buffer
  1200             iBuffer->AddNodeToBufferL( aURI, KNullDesC8, aStatusRef );
  1213             iBuffer->AddNodeToBufferL( aURI, KNullDesC8, aStatusRef );
  1201             OstTrace0( TRACE_NORMAL, CNAPBRANCH_ADDNODEOBJECTL_NEW_NODE2,
  1214             OstTrace0( TRACE_NORMAL, CNAPBRANCH_ADDNODEOBJECTL_NEW_NODE2,
  1202                     "CNapBranch::AddNodeObjectL;New node -> Add to buffer." );
  1215                     "CNapBranch::AddNodeObjectL;New node -> Add to buffer." );
  1203             }
  1216             }
  1204         else
  1217         else