IAP popup even when gprs is established.

Login to reply to this topic.
Sat, 2005-11-12 13:44
Joined: 2004-12-31
Forum posts: 83
i am able to establish gprs connection without popup in main thread.
now when gprs connection is active am making a http transaction and submitting it in another thread. but as soon as i submit i get a access point popup.

can it be because of having gprs and http in seperate threads.

any suggestions and resoning will help.

thanks

warm regards

saurabh


Mon, 2005-11-14 12:44
Joined: 2004-12-31
Forum posts: 83
Re: IAP popup even when gprs is established.
well i got the answer

there were two problems.
first i for got to specify the RSocketServ and RConnection's handle in the RHttpSession. code for the same is given below

Code:
RStringPool strP = iSession.StringPool();
RHTTPConnectionInfo connInfo = iSession.ConnectionInfo();

connInfo.SetPropertyL ( strP.StringF(HTTP::EHttpSocketServ,
RHTTPSession::GetTable() ),
THTTPHdrVal (iSockServ->Handle() );

TInt connPtr = REINTERPRET_CAST(TInt, &(iConnection()));

connInfo.SetPropertyL ( strP.StringF(HTTP::EHttpSocketConnection,
RHTTPSession::GetTable() ),
THTTPHdrVal (connPtr) );

where
iSockServ is a RSoctetServ
iConnection is a RConnection
iSession is a RHttpSession


Also the two things (establishing gprs using RSoctetServ and RConnection  and making RHttpSession ) have to be in same thread otherwise u'll get KERN EXEC 0 Panic which means that the Kernel Executive cannot find an object in the object index for the current process or current thread using the specified object index number (the raw handle number).


warm regards

saurabh

Fri, 2006-05-26 21:48
Joined: 2006-05-08
Forum posts: 162
Re: IAP popup even when gprs is established.
Quote from: saurabh_gyl
well i got the answer

there were two problems.
first i for got to specify the RSocketServ and RConnection's handle in the RHttpSession. code for the same is given below

Code:
RStringPool strP = iSession.StringPool();
RHTTPConnectionInfo connInfo = iSession.ConnectionInfo();

connInfo.SetPropertyL ( strP.StringF(HTTP::EHttpSocketServ,
RHTTPSession::GetTable() ),
THTTPHdrVal (iSockServ->Handle() );

TInt connPtr = REINTERPRET_CAST(TInt, &(iConnection()));

connInfo.SetPropertyL ( strP.StringF(HTTP::EHttpSocketConnection,
RHTTPSession::GetTable() ),
THTTPHdrVal (connPtr) );

where
iSockServ is a RSoctetServ
iConnection is a RConnection
iSession is a RHttpSession


Also the two things (establishing gprs using RSoctetServ and RConnection  and making RHttpSession ) have to be in same thread otherwise u'll get KERN EXEC 0 Panic which means that the Kernel Executive cannot find an object in the object index for the current process or current thread using the specified object index number (the raw handle number).



Well, they necessarily don't have to be in the same thread Grin. By default you can't share RSessionBase derived object (in your case, the RSocketServer) across threads, to enable this behaviour, you'll need to call RSocketServer::ShareAuto().

Do that and hopefully it will work, even with two threads. Btw, threads are not a good idea anyway and should stick to using AO's (unless you are porting applications or want something with realtime gaurantee/performance)

  • Login to reply to this topic.