merge with master
[framework/osp/net.git] / src / FNetNetStatistics.cpp
index a9053c2..170dde3 100644 (file)
@@ -72,7 +72,7 @@ NetStatistics::GetNetStatisticsInfo(NetBearerType operationMode, NetStatisticsIn
 
        ClearLastResult();
 
-       r = _AccessController::CheckUserPrivilege(_PRV_NETWORK_STATISTICS_READ);
+       r = _AccessController::CheckUserPrivilege(_PRV_NETWORK_STATISTICS_READ, _PRV_NETWORK_STATISTICS);
        r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_OUT_OF_MEMORY);
        SysTryReturn(NID_NET, r == E_SUCCESS, INVALID_HANDLE, r,
                        "[%s] The application does not have the privilege to call this method.", GetErrorMessage(r));
@@ -91,10 +91,6 @@ NetStatistics::Reset(NetBearerType operationMode, NetStatisticsInfoType netStatT
 {
        result r = E_SUCCESS;
 
-       r = _AccessController::CheckUserPrivilege(_PRV_NETWORK_STATISTICS_WRITE);
-       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_OUT_OF_MEMORY);
-       SysTryReturnResult(NID_NET, r == E_SUCCESS, r, "The application does not have the privilege to call this method.");
-
        SysAssertf(__pNetStatisticsImpl != null, "Not yet constructed. Construct() should be called before use.");
 
        r = __pNetStatisticsImpl->Reset(operationMode, netStatType);
@@ -108,10 +104,6 @@ NetStatistics::ResetAll(NetBearerType operationMode)
 {
        result r = E_SUCCESS;
 
-       r = _AccessController::CheckUserPrivilege(_PRV_NETWORK_STATISTICS_WRITE);
-       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_OUT_OF_MEMORY);
-       SysTryReturnResult(NID_NET, r == E_SUCCESS, r, "The application does not have the privilege to call this method.");
-
        SysAssertf(__pNetStatisticsImpl != null, "Not yet constructed. Construct() should be called before use.");
 
        r = __pNetStatisticsImpl->ResetAll(operationMode);