×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jan 2012
    Posts
    46

    Unhappy Couldn't setup connection for http post

    Hi,

    I was modifying one of my old application. I used http engine from wiki page for http post, which I couldn't found now. It has CClientEngine class. Anyway, my problem is whenever my application starts a http post process it doesn't return any data back. After some work with logs, I found out the problem occurs because of that function.

    Code:
    void CClientEngine::RunL()
        {
        TInt statusCode = iStatus.Int();
    
        if (!iConnectionSetupDone && statusCode == KErrNone)
            {
            // Connection done ok
            iConnectionSetupDone = ETrue;
            // Register for mobility API
            iMobility = CActiveCommsMobilityApiExt::NewL(iConnection, *this);
            // Start selected HTTP action
            switch (iEngineState)
               {
                case EIdle:
                    {
                    CancelTransaction();
                    break;
                    }
               case EGet:
                   {
                   DoHTTPGetL();
                   break;
                   }
               case EPost:
                   {
                   DoHTTPPostL();
                   break;
                   }
               };
            }
        else
        	{
        	TBuf8<50> errorBuff;
        	_LIT8(error, "Con Setup Err: %d");
        	errorBuff.Format(error,statusCode);
        	MYdebug->Write8(_L8("I"), _L8("RunL"), errorBuff);
        	}
        }
    At that code, function logs error code -30207. I don't know where to look with that error code. Please help me with this problem.

  2. #2
    Registered User
    Join Date
    Jan 2005
    Location
    Italy
    Posts
    639

    Re: Couldn't setup connection for http post

    Quote Originally Posted by Utoto View Post
    Hi,
    At that code, function logs error code -30207. I don't know where to look with that error code. Please help me with this problem.
    Hello,
    that error code is defined into wlanerrorcodes.h as:

    Code:
    /**
    * WLAN connection could not be started because one is already active.
    * @ingroup rconn_other
     */
    const TInt KErrWlanConnAlreadyActive                       = -30207;
    regards,
    pg

  3. #3
    Registered User
    Join Date
    Jan 2005
    Location
    Italy
    Posts
    639

    Re: Couldn't setup connection for http post

    Quote Originally Posted by Utoto View Post
    Hi,
    I was modifying one of my old application. I used http engine from wiki page for http post, which I couldn't found now. It has CClientEngine class.
    Maybe one of those listed in this category?
    https://www.developer.nokia.com/Deve...tworking.xhtml

    regards
    pg

  4. #4
    Registered User
    Join Date
    Jan 2005
    Location
    Italy
    Posts
    639

    Re: Couldn't setup connection for http post

    Hello,
    i received you pm: "Hi, thanks for your quick reply. But I couldn't found how to solve that problem. Can you help me with that? how can I make that code use already opened connection. "
    You can monitor active connections using Connection Monitor Server API, e.g.:
    http://www.developer.nokia.com/docum...rver_API4.html
    http://library.developer.nokia.com/i...onMonitor.html (open this twice to go to the real page)
    in particular RConnectionMonitor::GetConnectionsCount and RConnectionMonitor::GetConnectionInfo
    then you can use the already active connection, e.g. :
    http://www.developer.nokia.com/Commu...ive_connection
    or you can try to retrieve the active IAP, e.g.:
    http://www.developer.nokia.com/Commu...ymbian_C%2B%2B

    hope it helps somehow :-)
    pg

Similar Threads

  1. Post values to server using HTTP POST
    By ramtrg in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2011-08-23, 08:49
  2. Post values to server using HTTP POST
    By ramtrg in forum Symbian Networking & Messaging (Closed)
    Replies: 4
    Last Post: 2011-08-22, 11:34
  3. [moved] Couldn't launch Serial connection plz help
    By mhmd_ward in forum Symbian C++
    Replies: 9
    Last Post: 2008-11-28, 16:41
  4. http post request via socket connection
    By alliance205 in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2007-06-29, 11:25
  5. Need help! HTTP or TCP/IP Connection possible thru serial cable? (long post)
    By kurisu-chan in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2003-07-23, 04:51

Posting Permissions

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