×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Dec 2004
    Posts
    17

    Secure Socket read gets stuck in a loop on N70 device

    Hey guys, can anyone assis me with this problem.

    I have a problem with CSecureSocket read method on the N70 phone.
    I am able to establish a connection a secure connection to my server.
    The writing and reading of the data is encapsulated in active objects, like in the examples. I am also able to write data using CSecureSocket::Send(..).
    My problem is in the read methods both, CSecureSocket::RecvOneOrMore() and
    CSecureSocket::Recv(). The RunL() method associated with these functions gets stuck in a loop and hangs the phone. For some reason the framework keeps calling the RunL() method with the same data, even after it's been read and the buffer emptied!! The repeated calls eventually hangs the phone.

    The same code works for both the 6630 and 6680. Does anyone know of API changes for the secure socket b/w FP2 and FP3. I've built the source against FP3 for N70 and I still get he same problems.

    Urgent and assistance would be most appreciated.

  2. #2
    Registered User
    Join Date
    May 2005
    Posts
    19

    Re: Secure Socket read gets stuck in a loop on N70 device

    I got the same problem when using secure socket on N70 device. But mine is the J2me application.

    When i open the secure socket using port 995 to one mail server, N70 does not popup one window to notice me that it is a untrusted certificate, but 6680, 6630 does that. Then the application failed to get the secure socket.

    Any one knows how to make setting to let the device to notice me that it is a untrusted certificate, and i can confirm to pass it!

    Or any solutions for the N70.

    Thank you!

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    14

    Re: Secure Socket read gets stuck in a loop on N70 device

    Quote Originally Posted by jestyjames
    CSecureSocket::Recv(). The RunL() method associated with these functions gets stuck in a loop and hangs the phone. For some reason the framework keeps calling the RunL() method with the same data, even after it's been read and the buffer emptied!! The repeated calls eventually hangs the phone.

    The same code works for both the 6630 and 6680. Does anyone know of API changes for the secure socket b/w FP2 and FP3. I've built the source against FP3 for N70 and I still get he same problems..
    Hello!

    Did you find solution for this problem. I'm facing exactly the same behavior in CSecureSocket class.

  4. #4
    Regular Contributor
    Join Date
    Sep 2004
    Posts
    90

    Re: Secure Socket read gets stuck in a loop on N70 device

    Try to zero the buffer before reading:
    Code:
       iBuffer.Zero(); //<<<<<<
       iSecureSocket.RecvOneOrMore(iBuffer, iStatus, iDummyLength);
    --
    Tobias
    www.OutBank.de

  5. #5
    Registered User
    Join Date
    Mar 2003
    Posts
    14

    Re: Secure Socket read gets stuck in a loop on N70 device

    Quote Originally Posted by tobias_stoeger
    Try to zero the buffer before reading:
    Code:
       iBuffer.Zero(); //<<<<<<
       iSecureSocket.RecvOneOrMore(iBuffer, iStatus, iDummyLength);

    iBuffer.Zero() did not help, but iBuffer.FillZ() worked! Thanks!

  6. #6
    Regular Contributor
    Join Date
    Sep 2004
    Posts
    90

    Re: Secure Socket read gets stuck in a loop on N70 device

    That is a bit spooky.
    Haven't tested the FillZ().
    But the Zero() should work: http://forum.newlc.com/index.php/topic,11227.0.html
    I also have a N70-Version of my app running/published with Zero() and it works fine on emulator and different devices.
    --
    Tobias
    www.OutBank.de

Similar Threads

  1. Socket read on Nokia 6600 blocks forever
    By delipsingh in forum Mobile Java Networking & Messaging & Security
    Replies: 9
    Last Post: 2010-04-13, 15:00
  2. socket read hangs until socket is closed
    By camroe in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2005-07-21, 09:44
  3. Bluetooth L2CAP Socket: Read() vs. Recv()
    By jamespinakis in forum Symbian
    Replies: 2
    Last Post: 2004-06-11, 00:44
  4. TCP socket connection between Symbian device and Windows
    By raghucp in forum Symbian Networking & Messaging (Closed)
    Replies: 3
    Last Post: 2003-09-15, 10:15
  5. Bluetooth L2CAP Socket: Read() vs. Recv()
    By jamespinakis in forum Bluetooth Technology
    Replies: 1
    Last Post: 2003-06-10, 22:52

Posting Permissions

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