Groups > Symbian > Symbian EPOC connect > Re: Stopping RConnection on Symbian 9.1




Stopping RConnection on Symbian 9.1

Stopping RConnection on Symbian 9.1
Tue, 18 Jul 2006 11:48:26 +020
Hi all

I've got problems stopping an RConnection using it's Stop() function. 
Everytime I try, I get KErrPermissionDenied. I tried the second Stop() 
function too, specifing EStopAuthoritative but the same effect happens.
Until OS 8.1a everything worked quite fine. The sdk documentation doesn't 
state anything about needed capabilities for the Stop() function, so this 
shouldn't be the problem.

Has anyone been struggling with a similar problem or could tell me where the 
problem lies?

Thanks
Jan 

Post Reply
Re: Stopping RConnection on Symbian 9.1
Tue, 18 Jul 2006 12:45:21 +010
Jan Schenk wrote:
> Hi all
> 
> I've got problems stopping an RConnection using it's Stop() function. 
> Everytime I try, I get KErrPermissionDenied. I tried the second Stop() 
> function too, specifing EStopAuthoritative but the same effect happens.
> Until OS 8.1a everything worked quite fine. The sdk documentation doesn't 
> state anything about needed capabilities for the Stop() function, so this 
> shouldn't be the problem.
> 
> Has anyone been struggling with a similar problem or could tell me where
the 
> problem lies?
> 
> Thanks
> Jan 
> 
> 

I suspect that you do need capabilities to use RConnection::Stop 
(NetworkControl probably) and that the documentation is wrong.

Why are you using Stop anyway? Most client applications should be using 
Close instead as Stop will immediately kill the interface (potentially 
causing problems or additional work for other applications using it) 
rather than allowing the framework to shut down the interface later when 
Post Reply
Re: Stopping RConnection on Symbian 9.1
Tue, 18 Jul 2006 15:18:25 +010
Jan Schenk wrote:
> "Andrew" <andrew@somewhere.com> wrote in message 
> news:nuAkb$lqGHA.1040@UKCOL01WWEB01.symbian.intra...
> 
>>Jan Schenk wrote:
>>
>>>Hi all
>>>
>>>I've got problems stopping an RConnection using it's Stop()
function. 
>>>Everytime I try, I get KErrPermissionDenied. I tried the second
Stop() 
>>>function too, specifing EStopAuthoritative but the same effect
happens.
>>>Until OS 8.1a everything worked quite fine. The sdk documentation
doesn't 
>>>state anything about needed capabilities for the Stop() function, so
this 
>>>shouldn't be the problem.
>>>
>>>Has anyone been struggling with a similar problem or could tell me
where 
>>>the problem lies?
>>>
>>>Thanks
>>>Jan
>>
>>I suspect that you do need capabilities to use RConnection::Stop 
>>(NetworkControl probably) and that the documentation is wrong.
>>
>>Why are you using Stop anyway? Most client applications should be using

>>Close instead as Stop will immediately kill the interface (potentially 
>>causing problems or additional work for other applications using it) 
>>rather than allowing the framework to shut down the interface later when

>>other applications are finished with it (or go idle).
> 
> 
> Thanks Andrew for your help.
> 
> The reason I want to use Stop instead of Close is that I need to track the

> time the interface uses to disconnect by issuing a ProgressNotification. 
> This isn't possible with Close. There is no other application using the 
> interface as my application is the only one running at this time.
> Do you know how I could find out whether the documentation is erroneous and

> Stop needs a certain capability?
> 
> Cheers
> Jan 
> 
> 

Ok, I'm glad that you have a specific reason for using Stop, I just 
wanted to check. ProgressNotifications should work on Close too but you 
just might need to wait a while - I assume that is what you want to 
avoid if you are measuring the time from the request to the interface 
going down.

Are you testing on the emulator or on a device?
If testing on the emulator you could check the %temp%\epocwind.out log 
file for errors about missing capabilities (turn on the messages with 
the line PlatSecDiagnostics ON in epoc.ini). Failing that I would add 
NetworkControl to your MMP file and try it out - although if you are 
testing on a device that might be awkward as I don't think that 
capability is available either when self signing or when using a 
Post Reply
Re: Stopping RConnection on Symbian 9.1
Tue, 18 Jul 2006 15:43:06 +020
"Andrew" <andrew@somewhere.com> wrote in message 
news:nuAkb$lqGHA.1040@UKCOL01WWEB01.symbian.intra...
> Jan Schenk wrote:
>> Hi all
>>
>> I've got problems stopping an RConnection using it's Stop() function. 
>> Everytime I try, I get KErrPermissionDenied. I tried the second Stop()

>> function too, specifing EStopAuthoritative but the same effect
happens.
>> Until OS 8.1a everything worked quite fine. The sdk documentation
doesn't 
>> state anything about needed capabilities for the Stop() function, so
this 
>> shouldn't be the problem.
>>
>> Has anyone been struggling with a similar problem or could tell me
where 
>> the problem lies?
>>
>> Thanks
>> Jan
>
> I suspect that you do need capabilities to use RConnection::Stop 
> (NetworkControl probably) and that the documentation is wrong.
>
> Why are you using Stop anyway? Most client applications should be using 
> Close instead as Stop will immediately kill the interface (potentially 
> causing problems or additional work for other applications using it) 
> rather than allowing the framework to shut down the interface later when 
> other applications are finished with it (or go idle).

Thanks Andrew for your help.

The reason I want to use Stop instead of Close is that I need to track the 
time the interface uses to disconnect by issuing a ProgressNotification. 
This isn't possible with Close. There is no other application using the 
interface as my application is the only one running at this time.
Do you know how I could find out whether the documentation is erroneous and 
Stop needs a certain capability?

Cheers
Jan 

Post Reply
Re: Stopping RConnection on Symbian 9.1
Tue, 18 Jul 2006 19:54:03 +030
The documentation is inconsistent but if you know what to look for you 
will eventually find it: S60_3rd_MR » Symbian OS v9.1 » Symbian OS guide 
» Platform security » Symbian OS changes for platform security

TCPIP
These are the capabilities needed for the tcpip6.prt protocol module. 
See Using TCP/IP (INSOCK) for more information about TCP/IP on Symbian OS.

Method				Capabilities
....
RConnection::Stop()		NetworkControl
...


The situation is in fact logical since, as Andrew explained, by using 
this method you affect other apps using the same interface. Otherwise 
NetworkServices would have been enough.

HTH,

Andrew wrote:
> Jan Schenk wrote:
>> "Andrew" <andrew@somewhere.com> wrote in message 
>> news:nuAkb$lqGHA.1040@UKCOL01WWEB01.symbian.intra...
>>
>>> Jan Schenk wrote:
>>>
>>>> Hi all
>>>>
>>>> I've got problems stopping an RConnection using it's Stop() 
>>>> function. Everytime I try, I get KErrPermissionDenied. I tried
the 
>>>> second Stop() function too, specifing EStopAuthoritative but
the 
>>>> same effect happens.
>>>> Until OS 8.1a everything worked quite fine. The sdk
documentation 
>>>> doesn't state anything about needed capabilities for the Stop()

>>>> function, so this shouldn't be the problem.
>>>>
>>>> Has anyone been struggling with a similar problem or could tell
me 
>>>> where the problem lies?
>>>>
>>>> Thanks
>>>> Jan
>>>
>>> I suspect that you do need capabilities to use RConnection::Stop 
>>> (NetworkControl probably) and that the documentation is wrong.
>>>
>>> Why are you using Stop anyway? Most client applications should be 
>>> using Close instead as Stop will immediately kill the interface 
>>> (potentially causing problems or additional work for other 
>>> applications using it) rather than allowing the framework to shut 
>>> down the interface later when other applications are finished with
it 
>>> (or go idle).
>>
>>
>> Thanks Andrew for your help.
>>
>> The reason I want to use Stop instead of Close is that I need to track

>> the time the interface uses to disconnect by issuing a 
>> ProgressNotification. This isn't possible with Close. There is no 
>> other application using the interface as my application is the only 
>> one running at this time.
>> Do you know how I could find out whether the documentation is 
>> erroneous and Stop needs a certain capability?
>>
>> Cheers
>> Jan
>>
> 
> Ok, I'm glad that you have a specific reason for using Stop, I just 
> wanted to check. ProgressNotifications should work on Close too but you 
> just might need to wait a while - I assume that is what you want to 
> avoid if you are measuring the time from the request to the interface 
> going down.
> 
> Are you testing on the emulator or on a device?
> If testing on the emulator you could check the %temp%\epocwind.out log 
> file for errors about missing capabilities (turn on the messages with 
> the line PlatSecDiagnostics ON in epoc.ini). Failing that I would add 
> NetworkControl to your MMP file and try it out - although if you are 
> testing on a device that might be awkward as I don't think that 
> capability is available either when self signing or when using a 
Post Reply
<< Previous 1 2 Next >>
( Page 1 of 2 )
about | contact