Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor AlfredoRU's Avatar
    Join Date
    Dec 2005
    Posts
    121
    Hello!

    When I receive a "200 OK" Response, I'm interested in getting MessageBody.
    I'm using CSIPMessageElements::Content(). This method returns an incorrect TDesC8? I'm using this code:

    Code:
    const CSIPMessageElements& sipMessageElements = respElem->MessageElements();
    				
    TDesC8 desContent = sipMessageElements.Content();
    It's strange:

    desContent.Length() --> OK

    The length is correct, but the descriptor does not contain the actual MessageBody.

    These are the Descriptor Bytes in Hexadecimal:

    desContent[0] = 60
    desContent[1] = f8
    desContent[2] = 70
    desContent[3] = 0
    desContent[4] = 98
    desContent[5] = 78
    desContent[6] = 40
    desContent[7] = 0
    desContent[8] = 98
    desContent[9] = 78
    desContent[10] = 40
    desContent[11] = 0
    desContent[12] = 8
    desContent[13] = 0
    desContent[14] = 0
    desContent[15] = 30
    desContent[16] = f4
    desContent[17] = 1
    desContent[18] = 0
    desContent[19] = 0
    desContent[20] = 76
    desContent[21] = 0
    desContent[22] = 69
    desContent[23] = 0
    desContent[24] = 64
    desContent[25] = 0


    Using Ethereal I can see the message body that I receive from the network:

    48 6f 6c 61 20 63 61 72 61 63 6f 6c 61 20 43 f3 6d 6f 20 65 73 74 e1 73 0d 0a

    The lenght is the same: 26 bytes
    But the byte sequence is different!

    How can I do? I'm really lost with this.

    Thank you

  2. #2
    Regular Contributor AlfredoRU's Avatar
    Join Date
    Dec 2005
    Posts
    121
    Solved:

    I must use:

    const TDesC8& desContentCorrect = sipMessageElements.Content();

    instead of

    TDesC8 desContentIncorrect = sipMessageElements.Content();

    Has anybody an explanation?
    I'm not a C++ expert.

    Maybe:

    desContentCorrect= This is a reference to the Descriptor Object

    desContentIncorrect = This is not a reference. It's a different Descriptor (But why it has the same lenght?)
    Last edited by AlfredoRU; 2006-10-31 at 18:50.

  3. #3
    Super Contributor mayankkedia's Avatar
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146
    I see that the method Content has the following signature :-

    const TDesC8& CSIPMessageElements::Content ( ) const

    So it is returning a reference to the content as a descriptor only and I believe if you try recieving the same in the descriptor itself rather then a reference to the descriptor it causes the problems..does that make sense?

    Cheers

Similar Threads

  1. Replies: 605
    Last Post: 2011-01-20, 15:14
  2. How to send SIP PUBLISH message in S60 3rd edition
    By murkyl in forum Symbian Networking & Messaging (Closed)
    Replies: 5
    Last Post: 2007-08-29, 10:29
  3. Series 60Series 60 MIDP Concept SDK Beta 0.2 Linux bug?
    By kauppi in forum Mobile Java Tools & SDKs
    Replies: 3
    Last Post: 2003-04-07, 09:05
  4. nokia 7210 modem via IR doesn't work !
    By oussamaaiadi in forum PC Suite API and PC Connectivity SDK
    Replies: 1
    Last Post: 2003-03-06, 10:46
  5. Http connection problem in 6310i
    By teahola in forum Mobile Java General
    Replies: 1
    Last Post: 2002-10-03, 18:46

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved