commands: allow waiting for all states

parent f984925d
...@@ -850,24 +850,6 @@ int lxc_cmd_add_state_client(const char *name, const char *lxcpath, ...@@ -850,24 +850,6 @@ int lxc_cmd_add_state_client(const char *name, const char *lxcpath,
return state; return state;
} }
if ((state == STARTING) && !states[RUNNING] && !states[STOPPING] && !states[STOPPED]) {
TRACE("Container is in %s state and caller requested to be "
"informed about a previous state", lxc_state2str(state));
return state;
} else if ((state == RUNNING) && !states[STOPPING] && !states[STOPPED]) {
TRACE("Container is in %s state and caller requested to be "
"informed about a previous state", lxc_state2str(state));
return state;
} else if ((state == STOPPING) && !states[STOPPED]) {
TRACE("Container is in %s state and caller requested to be "
"informed about a previous state", lxc_state2str(state));
return state;
} else if ((state == STOPPED) || (state == ABORTING)) {
TRACE("Container is in %s state and caller requested to be "
"informed about a previous state", lxc_state2str(state));
return state;
}
ret = lxc_cmd(name, &cmd, &stopped, lxcpath, NULL); ret = lxc_cmd(name, &cmd, &stopped, lxcpath, NULL);
if (ret < 0) { if (ret < 0) {
ERROR("%s - Failed to execute command", strerror(errno)); ERROR("%s - Failed to execute command", strerror(errno));
...@@ -877,7 +859,6 @@ int lxc_cmd_add_state_client(const char *name, const char *lxcpath, ...@@ -877,7 +859,6 @@ int lxc_cmd_add_state_client(const char *name, const char *lxcpath,
/* We should now be guaranteed to get an answer from the state sending /* We should now be guaranteed to get an answer from the state sending
* function. * function.
*/ */
if (cmd.rsp.ret < 0) { if (cmd.rsp.ret < 0) {
ERROR("Failed to receive socket fd"); ERROR("Failed to receive socket fd");
return -1; return -1;
......
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