mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-29 05:17:54 +00:00
Rename FLUSHED state to FINISHED
This makes more sense when receiving event-only logs.
This commit is contained in:
parent
0337f5b735
commit
d2686dde0c
@ -326,7 +326,7 @@ handle_reject(RejectMessage *msg, struct connection_closure *closure)
|
|||||||
debug_return_bool(false);
|
debug_return_bool(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
closure->state = FLUSHED;
|
closure->state = FINISHED;
|
||||||
debug_return_bool(true);
|
debug_return_bool(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -381,7 +381,7 @@ handle_exit(ExitMessage *msg, struct connection_closure *closure)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Command exited, no I/O logs to flush. */
|
/* Command exited, no I/O logs to flush. */
|
||||||
closure->state = FLUSHED;
|
closure->state = FINISHED;
|
||||||
}
|
}
|
||||||
|
|
||||||
debug_return_bool(true);
|
debug_return_bool(true);
|
||||||
@ -777,7 +777,7 @@ server_msg_cb(int fd, int what, void *v)
|
|||||||
buf->off = 0;
|
buf->off = 0;
|
||||||
buf->len = 0;
|
buf->len = 0;
|
||||||
sudo_ev_del(closure->evbase, closure->write_ev);
|
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)
|
closure->state == ERROR)
|
||||||
goto finished;
|
goto finished;
|
||||||
}
|
}
|
||||||
@ -874,7 +874,7 @@ client_msg_cb(int fd, int what, void *v)
|
|||||||
"unable to receive %u bytes", buf->size - buf->len);
|
"unable to receive %u bytes", buf->size - buf->len);
|
||||||
goto finished;
|
goto finished;
|
||||||
case 0:
|
case 0:
|
||||||
if (closure->state != FLUSHED) {
|
if (closure->state != FINISHED) {
|
||||||
sudo_debug_printf(SUDO_DEBUG_WARN|SUDO_DEBUG_LINENO,
|
sudo_debug_printf(SUDO_DEBUG_WARN|SUDO_DEBUG_LINENO,
|
||||||
"unexpected EOF");
|
"unexpected EOF");
|
||||||
}
|
}
|
||||||
@ -917,7 +917,7 @@ client_msg_cb(int fd, int what, void *v)
|
|||||||
buf->len -= buf->off;
|
buf->len -= buf->off;
|
||||||
buf->off = 0;
|
buf->off = 0;
|
||||||
|
|
||||||
if (closure->state == FLUSHED)
|
if (closure->state == FINISHED)
|
||||||
goto finished;
|
goto finished;
|
||||||
|
|
||||||
debug_return;
|
debug_return;
|
||||||
@ -973,7 +973,7 @@ server_commit_cb(int unused, int what, void *v)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (closure->state == EXITED)
|
if (closure->state == EXITED)
|
||||||
closure->state = FLUSHED;
|
closure->state = FINISHED;
|
||||||
debug_return;
|
debug_return;
|
||||||
bad:
|
bad:
|
||||||
connection_closure_free(closure);
|
connection_closure_free(closure);
|
||||||
|
@ -75,7 +75,7 @@ enum connection_status {
|
|||||||
RUNNING,
|
RUNNING,
|
||||||
EXITED,
|
EXITED,
|
||||||
SHUTDOWN,
|
SHUTDOWN,
|
||||||
FLUSHED,
|
FINISHED,
|
||||||
ERROR
|
ERROR
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user