smsprotocols/smsstack/test/smsstackbaseteststeps.cpp
branchRCL_3
changeset 65 630d2f34d719
parent 14 7ef16719d8cb
child 66 07a122eea281
equal deleted inserted replaced
61:17af172ffa5f 65:630d2f34d719
   305     CleanupStack::PushL(smsMessage);
   305     CleanupStack::PushL(smsMessage);
   306 
   306 
   307     RSmsSocketReadStream readstream(aSocket);
   307     RSmsSocketReadStream readstream(aSocket);
   308     TRAPD(ret, readstream >> *smsMessage);
   308     TRAPD(ret, readstream >> *smsMessage);
   309  
   309  
   310     TPckgBuf<TUint> sbuf;
       
   311     TRequestStatus status;
   310     TRequestStatus status;
   312 
   311     
       
   312     // aDesc arguments passed to Ioctl() method have been changed to NULL to keep it compliant with
       
   313     // usage rules and to prevent OOM tests from failing
   313     if(ret==KErrNone)
   314     if(ret==KErrNone)
   314         {
   315         {
   315         aSocket.Ioctl(aIoctl, status, &sbuf, KSolSmsProv);
   316         aSocket.Ioctl(aIoctl, status, NULL, KSolSmsProv);
   316         User::WaitForRequest(status);
   317         User::WaitForRequest(status);
   317         CleanupStack::Pop(smsMessage);
   318         CleanupStack::Pop(smsMessage);
   318         TESTCHECK(status.Int(), KErrNone, "Notifying the SMS stack that message was received successfully");
   319         TESTCHECK(status.Int(), KErrNone, "Notifying the SMS stack that message was received successfully");
   319         INFO_PRINTF1(_L("Message received successfully"));
   320         INFO_PRINTF1(_L("Message received successfully"));
   320         }
   321         }
   321     //An error has occured, no message has been received
   322     //An error has occured, no message has been received
   322     else
   323     else
   323         {
   324         {
   324         aSocket.Ioctl(KIoctlReadMessageFailed, status, &sbuf, KSolSmsProv);
   325         aSocket.Ioctl(KIoctlReadMessageFailed, status, NULL, KSolSmsProv);
   325         User::WaitForRequest(status);
   326         User::WaitForRequest(status);
   326         TESTCHECK(status.Int(), KErrNone, "Notifying the SMS stack that message was not received");
   327         TESTCHECK(status.Int(), KErrNone, "Notifying the SMS stack that message was not received");
   327         ERR_PRINTF2(_L("Receiving message failed %d"), ret);
   328         ERR_PRINTF2(_L("Receiving message failed %d"), ret);
   328         User::Leave(ret);
   329         User::Leave(ret);
   329         }
   330         }