diff options
author | Simon Rettberg | 2016-01-20 16:43:34 +0100 |
---|---|---|
committer | Simon Rettberg | 2016-01-20 16:43:34 +0100 |
commit | 414c109d650a1014e7b84dfb66a00df420d67c97 (patch) | |
tree | ede0c5404aa408cd2bbb626312ed46383c7b13b6 /src/vsession.cpp | |
parent | Re-introduce tree structure: Allow server-defined sections (diff) | |
download | vmchooser2-414c109d650a1014e7b84dfb66a00df420d67c97.tar.gz vmchooser2-414c109d650a1014e7b84dfb66a00df420d67c97.tar.xz vmchooser2-414c109d650a1014e7b84dfb66a00df420d67c97.zip |
Remodel section handling: Use constants
Diffstat (limited to 'src/vsession.cpp')
-rw-r--r-- | src/vsession.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/vsession.cpp b/src/vsession.cpp index 79d3956..f0384a0 100644 --- a/src/vsession.cpp +++ b/src/vsession.cpp @@ -226,7 +226,14 @@ bool VSession::isValid() const { } int VSession::priority() const { - return getAttribute("priority").toInt(); + int prio = getAttribute("priority").toInt(); + if (g_templateHandling == TEMPLATES_BUMP) { + prio -= 500; + } + if (g_forLocationHandling == LOCATION_BUMP) { + prio -= 1000; + } + return prio; } void VSession::addUserAndHostname() { |