datacommsserver/esockserver/ssock/ss_conn.cpp
branchRCL_3
changeset 9 77effd21b2c9
parent 1 21d2ab05f085
child 11 98a7181d2ce7
equal deleted inserted replaced
5:68ef71f0cd72 9:77effd21b2c9
   521 	// will need to be brought over
   521 	// will need to be brought over
   522 	iLastProgress = aExistingConnection.iLastProgress;
   522 	iLastProgress = aExistingConnection.iLastProgress;
   523 	iLastProgressError = aExistingConnection.iLastProgressError;
   523 	iLastProgressError = aExistingConnection.iLastProgressError;
   524 	iProgressQueue = aExistingConnection.iProgressQueue;
   524 	iProgressQueue = aExistingConnection.iProgressQueue;
   525 
   525 
   526 	/**
       
   527 	   The first commented in section of code here is incorrect. It only clones one of the service providers and not them
       
   528 	   all. This means that certain calls, GetIntSetting being one, does not work on cloned connections. Unfortunately,
       
   529 	   some code now relies on this being broken (browser). This code needs to be fixed before the first section of code
       
   530 	   is removed and the proper code reinstated.
       
   531 	*/
       
   532 #if 1   // BAD CODE
       
   533 	RNodeInterface* sp = aExistingConnection.ServiceProvider();
       
   534 	if (sp)
       
   535 		{
       
   536 	    AddClientL(sp->RecipientId(), TClientType(TCFClientType::EServProvider, TCFClientType::EActive));
       
   537 
       
   538 		// TODO IK: This is the wrong message to be using here, should use JoinRequest/Complete handshake
       
   539 	    sp->PostMessage(Id(), TCFFactory::TPeerFoundOrCreated(Id(), 0).CRef());
       
   540         }
       
   541 	else
       
   542 		{
       
   543 		LOG( ESockLog::Printf(KESockConnectionTag, _L8("CConnection %08x CloneL KErrNotReady"), this) );
       
   544 		User::Leave(KErrNotReady);
       
   545 		}
       
   546 
       
   547 #else   // PROPER CODE
       
   548 	/*
   526 	/*
   549 	  This function looks like it'd be better to do in one loop. dont do this though. All fallible parts need to be done before
   527 	  This function looks like it'd be better to do in one loop. dont do this though. All fallible parts need to be done before
   550 	  sending the messages to ourselves, otherwise the mesh machine will panic.
   528 	  sending the messages to ourselves, otherwise the mesh machine will panic.
   551 	*/
   529 	*/
   552 	TInt numSP = 0;
   530 	TInt numSP = 0;
   593 			// TODO IK: This is the wrong message to be using here, should use JoinRequest/Complete handshake
   571 			// TODO IK: This is the wrong message to be using here, should use JoinRequest/Complete handshake
   594 			sp->PostMessage(Id(), TCFFactory::TPeerFoundOrCreated(Id(), 0).CRef());
   572 			sp->PostMessage(Id(), TCFFactory::TPeerFoundOrCreated(Id(), 0).CRef());
   595 			sp = iter++;
   573 			sp = iter++;
   596 			}
   574 			}
   597 		}
   575 		}
   598 #endif
       
   599 	}
   576 	}
   600 
   577 
   601 
   578 
   602 RNodeInterface* CConnection::DefaultSubConnectionServiceProvider()
   579 RNodeInterface* CConnection::DefaultSubConnectionServiceProvider()
   603  	{
   580  	{