Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor ash_21's Avatar
    Join Date
    May 2007
    Posts
    320
    Hi friends,
    I am doing an application where I am sending data to the server till IssueHTTPPostL, my application is working properly but after that it is crashing on OverallDatasize function. Here is my code for IssueHTTPPostL & overalldatasize.
    Code:
    	
    		SetupConnectionL();
    	
    		// Parse string to URI
    		TUriParser8 uri;
    		uri.Parse(aUri);
    	
    		// Copy data to be posted into member variable; iPostData is used later in
    		// methods inherited from MHTTPDataSupplier.
    		delete iPostData;
    		iPostData = aBody.AllocL();
    	
    	//code checking for number of active connections.
    	TBool CheckactiveConn = EFalse;
    	CheckactiveConn = AnyActiveConnectionsL();
    		// Get request method string for HTTP POST
    		RStringF method = iSession.StringPool().StringF(HTTP::EPOST,
    			RHTTPSession::GetTable());
    		
    		// Open transaction with previous method and parsed uri. This class will
    		// receive transaction events in MHFRunL and MHFRunError.
    
    	        iTransaction = iSession.OpenTransactionL(uri, *this, method);
    
    		// content type.
    		RHTTPHeaders hdr = iTransaction.Request().GetHeaderCollection();
    		SetHeaderL(hdr, HTTP::EUserAgent, KUserAgent);
    		SetHeaderL(hdr, HTTP::EAccept, KAccept);
    		SetHeaderL(hdr, HTTP::EContentType, aContentType);
    
    		// Set this class as an data supplier. Inherited MHTTPDataSupplier methods
    		// are called when framework needs to send body data.
    		MHTTPDataSupplier* dataSupplier = this;
    		iTransaction.Request().SetBody(*dataSupplier);
    
    		// Submit the transaction. After this the framework will give transaction
    		// events via MHFRunL and MHFRunError.
    		iTransaction.SubmitL();
    
    		iRunning = ETrue;
    		_LIT(KConnecting,"Connecting...");
    		iObserver.ClientEvent(KConnecting);
    Code:
    TInt CGPRSEngine::OverallDataSize()
    	{
    		if(iPostData)
    		{
    			return iPostData->Length();
    		}
    		else
    		{
    			return KErrNotFound ;
    		}
    	}
    I have used these two functions. If anybody knows why immediately after completion of IssueHTTPPostL control is coming to Overalldatasize.
    Thanks in advance.
    Regards,
    Life is Short..... Live it with Positive Attitude...

  2. #2
    Regular Contributor ash_21's Avatar
    Join Date
    May 2007
    Posts
    320
    Resolved the error.
    Life is Short..... Live it with Positive Attitude...

Similar Threads

  1. Do Symbian rejects the Express Signing request on any Business Development ground?
    By arpit2agrawal in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 23
    Last Post: 2009-02-19, 10:46
  2. Replies: 8
    Last Post: 2009-01-20, 13:47
  3. Application crashing MMFServerProxy...
    By codepatch in forum Symbian C++
    Replies: 4
    Last Post: 2007-07-25, 16:58
  4. establishing GPRS in between an application.
    By sheenanaseer in forum Mobile Java General
    Replies: 0
    Last Post: 2006-04-25, 11:44
  5. Application crashing on Close(Debug)
    By amitaggarwal in forum Symbian C++
    Replies: 3
    Last Post: 2004-07-20, 07:41

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