userlibandfileserver/fileserver/sfile/sf_main.cpp
changeset 273 6a75fa55495f
parent 134 95847726fe57
child 299 b5a01337d018
equal deleted inserted replaced
271:dc268b18d709 273:6a75fa55495f
    76 //
    76 //
    77 	{
    77 	{
    78 	TInt fn = Message().Function();
    78 	TInt fn = Message().Function();
    79 
    79 
    80 	// CServer2::DoConnectL() manipulates iSessionQ & so does CSession2::~CSession2().
    80 	// CServer2::DoConnectL() manipulates iSessionQ & so does CSession2::~CSession2().
    81 	// Unfortunately the session is deleted from a seperate thread (the disconnect 
    81 	// Unfortunately the session may be deleted from a drive thread so we need a lock to protect it.
    82 	// thread) so we need a lock to protect it.
       
    83 	if (fn == RMessage2::EConnect)
    82 	if (fn == RMessage2::EConnect)
    84 		{
    83 		{
    85 		SessionQueueLockWait();		// lock
    84 		SessionQueueLockWait();		// lock
    86 		CServer2::RunL();
    85 		CServer2::RunL();
    87 		SessionQueueLockSignal();	// unlock
    86 		SessionQueueLockSignal();	// unlock
   457 	AllCapabilities=*(SCapabilitySet*)∩︀
   456 	AllCapabilities=*(SCapabilitySet*)∩︀
   458 	caps.SetDisabled();
   457 	caps.SetDisabled();
   459 	DisabledCapabilities=*(SCapabilitySet*)∩︀
   458 	DisabledCapabilities=*(SCapabilitySet*)∩︀
   460 
   459 
   461 	FsThreadManager::SetMainThreadId();
   460 	FsThreadManager::SetMainThreadId();
   462 	r=FsThreadManager::CreateDisconnectThread();
       
   463 	__ASSERT_ALWAYS(r==KErrNone,Fault(EMainDisconnectThread));
       
   464 
   461 
   465 
   462 
   466 	//
   463 	//
   467 	// Install a trap handler
   464 	// Install a trap handler
   468 	//
   465 	//