Hello,
I'm using in my app http api from httpexampleclient SDK example.
Connect is made by WLAN, but sometimes connection with iConnection.Start(iStatus);
returns -1 error code, so i want to reselect or select diffrent acces point. My code looks like:
After -1 in connResultCode:void CClient::ConstructL() { // Open connection. User::LeaveIfError(iSocketServ.Connect()); TInt result = iConnection.Open(iSocketServ); // Open the RHTTPSession iSess.OpenL(); // setup preferences iStatus.SetDialogPreference(ECommDbDialogPrefDoNotPrompt); // Initiate connection TInt connResult = iConnection.Start(iStatus); if(connResult!=KErrNone) { // If connection failed, launch IAP selection dialog. TInt stopResult = iConnection.Stop(); iStatus.SetDialogPreference(ECommDbDialogPrefPrompt); connResult = iConnection.Start(iStatus); } // Install this class as the callback for authentication requests InstallAuthenticationL(iSess); User::LeaveIfError(iFileServ.Connect()); iTransObs = CEventHandler::NewL(); }
returns -18(KErrNotReady) , but IAP dialog is shown.Code:TInt stopResult = iConnection.Stop();
Then I select WLAN access point - > app crash immediately.
What I'm doing wrong?
(Any clue will be appreciated).
Cheers
~bartosh



