summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarol Wachowski <karol.wachowski@intel.com>2020-06-24 12:12:23 +0300
committerWachowski, Karol <karol.wachowski@intel.com>2020-07-01 09:39:07 +0300
commitc1dd28ebf57ee9bd9077007b52ebcaa70347f5e7 (patch)
tree380d3cdc6331ccb4584b46dbcc56aa56e2a4a1dc
parent4b240dcec0e167d87ce11d0828a41316037c74d3 (diff)
downloadvirtual-media-c1dd28ebf57ee9bd9077007b52ebcaa70347f5e7.tar.xz
Use timeout value from virtual-media.json file
timeout value was always set to default instead of using configuration file. Tested: verified that timeout value set in /etc/virtual-media.json is actually used by service Signed-off-by: Karol Wachowski <karol.wachowski@intel.com> Change-Id: I6865f25c91d95eb273792798f6159838cfd013c5 Signed-off-by: Karol Wachowski <karol.wachowski@intel.com>
-rw-r--r--src/configuration.hpp4
-rw-r--r--src/state_machine.hpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/configuration.hpp b/src/configuration.hpp
index 99dbec1..68606cc 100644
--- a/src/configuration.hpp
+++ b/src/configuration.hpp
@@ -39,8 +39,10 @@ class Configuration
static std::vector<std::string> toArgs(const MountPoint& mp)
{
+ const auto timeout = std::to_string(mp.timeout.value_or(30));
std::vector<std::string> args = {
- "-t", "30", "-u", mp.unixSocket, mp.nbdDevice.to_path(), "-n"};
+ "-t", timeout, "-u", mp.unixSocket, mp.nbdDevice.to_path(),
+ "-n"};
return args;
}
};
diff --git a/src/state_machine.hpp b/src/state_machine.hpp
index c0f331f..e442631 100644
--- a/src/state_machine.hpp
+++ b/src/state_machine.hpp
@@ -1002,7 +1002,7 @@ struct MountPointStateMachine
if (ret != 0)
{
// This shouldn't ever happen, perhaps best is to restart app
- LogMsg(Logger::Critical, name, " Some serious failrue happen!");
+ LogMsg(Logger::Critical, name, " Some serious failure happened!");
return false;
}
return true;