Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor Lichtens's Avatar
    Join Date
    Apr 2007
    Location
    Germany, Stuttgart
    Posts
    241
    Hi,

    in my Applikation i'm sending udp packet data through a RSocket.

    iSocket.SendTo(_L8("this is a test"), anAddr, 0, iStatus);

    works fine, when i'm sending data over wifi to socket.

    Only when i'm trying to send over the mobile (hsdpa) network, the result in iStatus is -40 (KErrTooBig).

    Anybody an idea, what is happening here?

    Best Regards,
    Andi

  2. #2
    Registered User david.caabeiro's Avatar
    Join Date
    Apr 2005
    Location
    Barcelona
    Posts
    1,678
    Always avoid using local variables with async methods. It will save you some headaches..

  3. #3
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    An addition: not just anAddr is a local variable (and should be copied to a member variable), but _L8 is a local entity too. However if you replace it with _LIT8, that is a global one.

  4. #4
    Regular Contributor Lichtens's Avatar
    Join Date
    Apr 2007
    Location
    Germany, Stuttgart
    Posts
    241
    Hi,
    and thank you both.
    So i think, the Literal ist the problem then. The Address is no lokal variable in my real code i just wrote the example in here, and didn't thought about the variable name.

    As I told, it works on the wifi network. Is this because the network is faster and so the async sending is so fast, that the lokal Litaral is not destroyed until sending is finished?

    Regards,
    Andi

  5. #5
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    Quote Originally Posted by Lichtens View Post
    As I told, it works on the wifi network. Is this because the network is faster and so the async sending is so fast, that the lokal Litaral is not destroyed until sending is finished?
    It is a matter of luck and what your code does after returning from this method. The literal itself will remain in the memory block assigned to the program stack until it is overwritten. And it entirelly depends on your application.

  6. #6
    Regular Contributor Lichtens's Avatar
    Join Date
    Apr 2007
    Location
    Germany, Stuttgart
    Posts
    241
    Ok, changing the literal to a global one, solved the problem!

    Thanks a lot,
    Andi

Similar Threads

  1. Replies: 11
    Last Post: 2007-10-03, 19:46
  2. Sending an SMS from Mobile to Servlet?!!
    By omarZam in forum General Messaging
    Replies: 0
    Last Post: 2006-06-04, 17:06
  3. retrieving network measurement report (NMR) of mobile phone
    By baki_aiub in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2006-05-26, 19:16
  4. How Mobile equipment interact with new GSM network on the move?
    By parvez_siddiqui in forum Multimodecards
    Replies: 1
    Last Post: 2002-09-27, 09:47
  5. can not successfully link any sample using .NET
    By lobotomat in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2002-08-20, 00:29

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