Commit c79ef222 authored by Jo-Philipp Wich's avatar Jo-Philipp Wich

main: fix logic bug when not specifying a timeout option

Signed-off-by: default avatarJo-Philipp Wich <jo@mein.io>
parent 2cc4b998
......@@ -74,7 +74,7 @@ int main(int argc, char **argv)
break;
case 't':
exec_timeout = strtol(optarg, NULL, 0);
exec_timeout = 1000 * strtol(optarg, NULL, 0);
break;
default:
......@@ -82,13 +82,11 @@ int main(int argc, char **argv)
}
}
if (exec_timeout < 1 || exec_timeout > 600) {
if (exec_timeout < 1000 || exec_timeout > 600000) {
fprintf(stderr, "Invalid execution timeout specified\n");
return -1;
}
exec_timeout *= 1000;
if (stat(RPC_UCI_DIR_PREFIX, &s))
mkdir(RPC_UCI_DIR_PREFIX, 0700);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment