Unverified Commit 4aa5a10e by Stéphane Graber Committed by GitHub

Merge pull request #3583 from brauner/2020-11-18/fixes

commands_utils: fix lxc-wait
parents 2cc8d550 d2bab66f
......@@ -62,7 +62,7 @@ int lxc_cmd_sock_get_state(const char *name, const char *lxcpath,
ret = lxc_cmd_add_state_client(name, lxcpath, states, &state_client_fd);
if (ret < 0)
return ret_errno(EINVAL);
return -errno;
if (ret < MAX_STATE)
return ret;
......
......@@ -100,10 +100,8 @@ int lxc_wait(const char *lxcname, const char *states, int timeout,
if (state >= 0)
break;
if (errno != ECONNREFUSED) {
SYSERROR("Failed to receive state from monitor");
return -1;
}
if (errno != ECONNREFUSED)
return log_error_errno(-1, errno, "Failed to receive state from monitor");
if (timeout > 0)
timeout--;
......
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