IAP popup even when gprs is established.
| Sat, 2005-11-12 13:44 | |
|
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 |
|






Forum posts: 83
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
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) );
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
Forum posts: 162
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
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) );
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
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)
http://www.tanzim.co.uk