×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jul 2005
    Posts
    10

    RConnection::Start error -2008

    Hi all,

    When I use RConnection::Start it returns with an error code -2008.
    What does this error code mean and what should i do to fix it?

    I use the following code:
    (conn is an RConnection..)

    TRequestStatus status;

    TInetAddr destAddr;
    destAddr.Input(aIP);
    destAddr.SetPort(aPort);

    // Connect to the socket server
    TInt res = iSocketServer.Connect();
    if (res != KErrNone)
    return res;

    // Open an RConnection object.
    res = conn.Open(iSocketServer);
    if (res != KErrNone)
    return res;

    // Create overrides
    TCommDbConnPref prefs;
    prefs. SetDialogPreference(ECommDbDialogPrefDoNotPrompt);
    prefs.SetDirection(ECommDbConnectionDirectionOutgoing);
    prefs.SetIapId(4);


    // Start an Outgoing Connection with overrides
    // This is where the conn.Start returns with an error code -2008
    res = conn.Start(prefs);
    if (res != KErrNone)
    return res;



    // Open a Socket associated with the connection
    res = iSocket.Open(iSocketServer, KAfInet, KSockStream, KProtocolInetTcp, conn);
    if (res != KErrNone)
    return res;

    // Request the Socket to connect to the destination
    iSocket.Connect(destAddr, status);
    return KErrNone;


    Thanks...

  2. #2
    Registered User
    Join Date
    Oct 2004
    Posts
    4

    Re: RConnection::Start error -2008

    KErrEtelNoAnswer -2008 "Call was not answered". I would check and make sure that network is working as expected.

    Thanks
    Ashish

  3. #3
    Registered User
    Join Date
    Jan 2005
    Location
    Helsinki, Finland
    Posts
    257

    Re: RConnection::Start error -2008

    Hi,

    It seems the problem is in prefs.SetIapId(4); Did you check what Iap is in index 4 (in your iap list)? I think that iap is not configured to make a successful connection. Everything else looks fine.

  4. #4
    Registered User
    Join Date
    Jul 2005
    Posts
    10

    Re: RConnection::Start error -2008

    Thanks madsum.

    I've cancled the "create override" section to get a list of iap and i chose the right one. So it works.

    10x.

Similar Threads

  1. Difference between RConnection::Start and ::Attach?
    By kosjanne in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2009-01-20, 12:04
  2. RConnection::Start error codes
    By GuusDavidson in forum Symbian
    Replies: 4
    Last Post: 2008-09-15, 13:54

Posting Permissions

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