summaryrefslogtreecommitdiffstats
path: root/src/pvs.cpp
diff options
context:
space:
mode:
authorFabian Schillinger2010-11-10 19:16:47 +0100
committerFabian Schillinger2010-11-10 19:16:47 +0100
commit659e756d5ba4944de7d8d87cbf3574cd97027150 (patch)
tree7d2e0470d7b4ce7b18e3bb57a585a926ab44547d /src/pvs.cpp
parentMerge branch 'master' of openslx.org:pvs (diff)
downloadpvs-659e756d5ba4944de7d8d87cbf3574cd97027150.tar.gz
pvs-659e756d5ba4944de7d8d87cbf3574cd97027150.tar.xz
pvs-659e756d5ba4944de7d8d87cbf3574cd97027150.zip
moved filter for ProcessList to pvsmgr.conf (this way the user cant modify its filter)
Diffstat (limited to 'src/pvs.cpp')
-rwxr-xr-xsrc/pvs.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/pvs.cpp b/src/pvs.cpp
index 843a725..1f751b8 100755
--- a/src/pvs.cpp
+++ b/src/pvs.cpp
@@ -263,7 +263,7 @@ void PVS::onCommand(PVSMsg cmdMessage)
if (ident.compare("SHOWPROCESSES") == 0)
{
_pvsServerConnection->sendMessage(PVSMsg(PVSCOMMAND, "PROCESSES", "SHOW clear")); //tell the client that we want to clear his process-list
- showProc();
+ showProc(message);
return;
}
if (ident.compare("STARTPROCESS") == 0)
@@ -938,10 +938,9 @@ QString PVS::getConfigValue(QString key)
return _settings.value(key).toString();
}
-void PVS::showProc()
+void PVS::showProc(QString filter)
{
- QString settings = getConfigValue("RemoteProcess/filter");
- QStringList filter = settings.split(" ");
+ QStringList filterList = filter.split(" ");
//look at procfs
QDir procfs("/proc");
@@ -988,9 +987,9 @@ void PVS::showProc()
}
if (write) //check if user belongs to pvs
{
- for (int i=0;i<filter.size();i++)
+ for (int i=0;i<filterList.size();i++)
{
- if (name == (filter.at(i)))
+ if (name == (filterList.at(i)))
write = false;
}
}