2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 01:49:11 +00:00

Rename FLUSHED state to FINISHED

This makes more sense when receiving event-only logs.
This commit is contained in:
Todd C. Miller 2020-05-13 09:30:05 -06:00
parent 0337f5b735
commit d2686dde0c
2 changed files with 7 additions and 7 deletions

View File

@ -326,7 +326,7 @@ handle_reject(RejectMessage *msg, struct connection_closure *closure)
debug_return_bool(false);
}
closure->state = FLUSHED;
closure->state = FINISHED;
debug_return_bool(true);
}
@ -381,7 +381,7 @@ handle_exit(ExitMessage *msg, struct connection_closure *closure)
}
} else {
/* Command exited, no I/O logs to flush. */
closure->state = FLUSHED;
closure->state = FINISHED;
}
debug_return_bool(true);
@ -777,7 +777,7 @@ server_msg_cb(int fd, int what, void *v)
buf->off = 0;
buf->len = 0;
sudo_ev_del(closure->evbase, closure->write_ev);
if (closure->state == FLUSHED || closure->state == SHUTDOWN ||
if (closure->state == FINISHED || closure->state == SHUTDOWN ||
closure->state == ERROR)
goto finished;
}
@ -874,7 +874,7 @@ client_msg_cb(int fd, int what, void *v)
"unable to receive %u bytes", buf->size - buf->len);
goto finished;
case 0:
if (closure->state != FLUSHED) {
if (closure->state != FINISHED) {
sudo_debug_printf(SUDO_DEBUG_WARN|SUDO_DEBUG_LINENO,
"unexpected EOF");
}
@ -917,7 +917,7 @@ client_msg_cb(int fd, int what, void *v)
buf->len -= buf->off;
buf->off = 0;
if (closure->state == FLUSHED)
if (closure->state == FINISHED)
goto finished;
debug_return;
@ -973,7 +973,7 @@ server_commit_cb(int unused, int what, void *v)
}
if (closure->state == EXITED)
closure->state = FLUSHED;
closure->state = FINISHED;
debug_return;
bad:
connection_closure_free(closure);

View File

@ -75,7 +75,7 @@ enum connection_status {
RUNNING,
EXITED,
SHUTDOWN,
FLUSHED,
FINISHED,
ERROR
};