TInt CTestSetPrClientMulCallFrDiffClt ::SecondThreadFunctiona(TAny* aThreadData2) { RTelServer server; CTestStep* testStep = static_cast<CTestStep*>(aThreadData2); CTrapCleanup* cleanup; if ((cleanup=CTrapCleanup::New())==NULL) { return KErrGeneral; } TInt ret = server.Connect(); testStep->TEST1(ret==KErrNone,ETrue); testStep->INFO_PRINTF2(_L("Thread2 RTelServer::Connect returned %d."),ret); ret=server.SetPriorityClient(); testStep->TEST1((ret == KErrNone) || (ret == KErrAlreadyExists),ETrue); testStep->INFO_PRINTF2(_L("Thread2 RTelServer::SetPriorityClient returned %d."),ret); server.Close(); delete cleanup; return ret; }
TInt CTestSetPrClientV2MulCallFrDiffClt ::FirstThreadFunctiona(TAny* aThreadData1) { RTelServer server; CTestStep* testStep = static_cast<CTestStep*>(aThreadData1); CTrapCleanup* cleanup; if ((cleanup=CTrapCleanup::New())==NULL) { return KErrGeneral; } TInt ret = server.Connect(); testStep->TEST1(ret==KErrNone,ETrue); testStep->INFO_PRINTF2(_L("Thread1 RTelServer::Connect returned %d."),ret); ret=server.SetPriorityClientV2(); testStep->TEST1(( (ret==KErrAlreadyExists) || (ret==KErrNone) ),ETrue); testStep->INFO_PRINTF2(_L("Thread1 RTelServer::SetPriorityClientV2 returned %d."),ret); User::After(KETelThreadShutdownGuardPeriod); server.Close(); delete cleanup; return ret; }