aboutsummaryrefslogtreecommitdiffstats
path: root/parameter
diff options
context:
space:
mode:
Diffstat (limited to 'parameter')
-rw-r--r--parameter/ParameterMgr.cpp11
-rw-r--r--parameter/ParameterMgr.h2
2 files changed, 7 insertions, 6 deletions
diff --git a/parameter/ParameterMgr.cpp b/parameter/ParameterMgr.cpp
index edf8080..b81243d 100644
--- a/parameter/ParameterMgr.cpp
+++ b/parameter/ParameterMgr.cpp
@@ -1414,11 +1414,6 @@ CParameterMgr::CCommandHandler::CommandStatus CParameterMgr::getParameterCommman
CParameterMgr::CCommandHandler::CommandStatus CParameterMgr::setParameterCommmandProcess(const IRemoteCommand& remoteCommand, string& strResult)
{
- // Check tuning mode
- if (!checkTuningModeOn(strResult)) {
-
- return CCommandHandler::EFailed;
- }
// Get value to set
string strValue = remoteCommand.packArguments(1, remoteCommand.getArgumentCount() - 1);
@@ -1644,6 +1639,12 @@ CParameterMgr::CCommandHandler::CommandStatus
// User set/get parameters in main BlackBoard
bool CParameterMgr::accessParameterValue(const string& strPath, string& strValue, bool bSet, string& strError)
{
+ // Forbid write access when not in TuningMode
+ if (bSet && !checkTuningModeOn(strError)) {
+
+ return false;
+ }
+
// Define context
CParameterAccessContext parameterAccessContext(strError, _pMainParameterBlackboard, _bValueSpaceIsRaw, _bOutputRawFormatIsHex);
diff --git a/parameter/ParameterMgr.h b/parameter/ParameterMgr.h
index 7ce19a5..5fd41b1 100644
--- a/parameter/ParameterMgr.h
+++ b/parameter/ParameterMgr.h
@@ -205,7 +205,6 @@ public:
bool sync(std::string& strError);
// User set/get parameters
- bool accessValue(CParameterAccessContext& parameterAccessContext, const std::string& strPath, std::string& strValue, bool bSet, std::string& strError);
bool accessParameterValue(const std::string& strPath, std::string& strValue, bool bSet, std::string& strError);
/**
* Returns the element mapping corresponding to the path given in parameter.
@@ -502,6 +501,7 @@ private:
CParameterBlackboard* getParameterBlackboard();
// Parameter access
+ bool accessValue(CParameterAccessContext& parameterAccessContext, const std::string& strPath, std::string& strValue, bool bSet, std::string& strError);
bool doSetValue(const std::string& strPath, const std::string& strValue, bool bRawValueSpace, bool bDynamicAccess, std::string& strError) const;
bool doGetValue(const std::string& strPath, std::string& strValue, bool bRawValueSpace, bool bHexOutputRawFormat, bool bDynamicAccess, std::string& strError) const;