×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    5

    CSMSEngine, socketlisten and intercept message dissapearing...

    I am usig CSMSEngine (soc.cpp) and everything works fine, except that the message i intercept never gets to inbox. When i intercet it, i can manipulate it and everything, but it does not get recorded in the inbox. Is this normal with sockets and what can i do to get it recorded nicely...

    My intercept code...
    Code:
    // -----------------------------------------------------------------------------
    // CSMSEngine::RunL()
    // Gets hit everytime a message with the 'tag' arrives
    // -----------------------------------------------------------------------------
    //
    void CSMSEngine::RunL()
    	{
    	if(iRead)
    	    {
    		CSmsBuffer *smsBuffer = CSmsBuffer::NewL();
    		CleanupStack::PushL(smsBuffer);
    		//Stream that reads a CSmsMessage object across a socket.
    		RSmsSocketReadStream readStream(iSocket);
    		//Allocates and creates a CSmsMessage
    		//ESmsDeliver-SMS-DELIVER, sent from service center to Mobile Station. 
    		iSmsMessage = CSmsMessage::NewL(iFs,CSmsPDU::ESmsDeliver,smsBuffer);
    		//Internalises data from stream to CSmsMessage
    		iSmsMessage->InternalizeL(readStream);
    		readStream.Close();	
    		//Extracting the received message to a buffer	
    		iSmsMessage->Buffer().Extract(iBuf,0,iSmsMessage->Buffer().Length());
    	   	iSocket.Ioctl( KIoctlReadMessageSucceeded, iStatus, &iPckgBuf, KSolSmsProv);
    
    	   	//Printing the received Message.
    //	    CAknInformationNote* note122=new(ELeave) CAknInformationNote;
    	//    note122->ExecuteLD(iBuf);
    		iRead=ETrue;		
    		SetActive();
    		
                    // my procedure for forwarding the SMS, also using socteks, works fine, and forwards the sms fine....
    		SendSMS(PhoneNumber,iBuf,ServiceCenter);
    
    				
    		CleanupStack::PopAndDestroy(smsBuffer);
    	    }
    	}

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: CSMSEngine, socketlisten and intercept message dissapearing...

    I think it is meant to work that way. To fix it you could make the SMS by yourself, or change your implementation to utilize normal inbox monitoring code, and doing the changes after the SMS is put normally to the inbox.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×