×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Regular Contributor
    Join Date
    Apr 2003
    Location
    Switzerland
    Posts
    61

    Stopping and starting connection

    Hi all,

    I'm trying to stop an active connection and then start a new one
    using RGenericAgent, and I've run into problems.
    Stopping seems to work fine, but then when I try to start it again,
    using StartOutgoing() it fails with KErrInUse.
    I've tried everything I can think of, including getting progress
    nofications, waiting with User::After, closing the agent and
    opening it again. Nothing seems to work. Any ideas anyone?
    Any help at all would be much appreciated.

    Cheers,
    Bjorn

  2. #2
    Registered User
    Join Date
    May 2005
    Location
    France
    Posts
    10
    Hi,

    I've got exactly the same problem.

    It seems that if you close the current connection through Tools/Connection Manger, switching to another IAP is possible afterwards.

    Have you found a code-wise solution to this ?

    Emmanuel

  3. #3
    Regular Contributor
    Join Date
    Apr 2003
    Location
    Switzerland
    Posts
    61
    Hmm, this was quite a while ago, but I did find a solution for it. If I remember correctly this was caused by a known error in the Series60 platform. The solution was that when/if you get KErrInUse you simply have to try and call StartOutgoing again, and the second time it works. I simply added a retry mechanism to my RunL. If I got KErrInUse during connection stage I simply called StartOutgoing again. As far as I remember that solved the problem.

    Hope this helps.

    Regards,
    Bjorn

  4. #4
    Registered User
    Join Date
    May 2005
    Location
    France
    Posts
    10
    Thanks man,

    that code strip is actually included in the application, but I solved the problem by completely reinitialising the phone.

    I must have thrown the CommsDB into some kind of secondary state. too much tempering I guess.

    greetings from Webraska :-)

    Emmanuel
    from the IbDN team (oh yeah)

  5. #5
    Regular Contributor
    Join Date
    Apr 2003
    Location
    Switzerland
    Posts
    61
    Hey man! :-) How are you doing? Been a long time!

    Cheers,
    Bjorn

  6. #6
    Registered User
    Join Date
    May 2005
    Location
    France
    Posts
    10
    Well,

    moved over from WinCE to Symbian. New platform, new problems, new challenge. Trying to get a finalized product out as soon as we can right now.

    How about yourself ? Still chewing on those tobacco bags ?

  7. #7
    Regular Contributor
    Join Date
    Apr 2003
    Location
    Switzerland
    Posts
    61
    Yeah, there are a lot of things to get used to when switching to Symbian.

    Nope, quit the tobacco in february, also got engaged and am getting married this summer :-)

    Cheers,
    Bjorn

  8. #8
    Registered User
    Join Date
    May 2005
    Location
    France
    Posts
    10
    Well congratulations mate,
    wish you all the best for what's coming ;-)

    manu

  9. #9
    Regular Contributor
    Join Date
    Sep 2004
    Posts
    90
    Hi,
    after some deep device logging it seems really that there is a problem if one wants to 'reuse' a new RGenericAgent for the current thread on Series60,v1.2 devices.
    But a 'reuse' is not necessary.
    One RGenericAgent is enough for the whole lifetime of your thread. In my case I open,stop & close the instance in the 'Server.cpp' .
    Keep care that you 'wait' for the response of the StartOutgoing before you use the socket(s).
    --
    Tobias
    www.HBufC.com
    www.OutBank.de

Posting Permissions

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