automount: use unit_pending_inactive() where appropriate

This commit is contained in:
Lennart Poettering
2011-01-26 02:55:35 +01:00
parent 0238cd03de
commit 5d909e3ec3
2 changed files with 4 additions and 1 deletions
+2 -1
View File
@@ -573,7 +573,8 @@ static void automount_enter_runnning(Automount *a) {
/* We don't take mount requests anymore if we are supposed to
* shut down anyway */
if (a->meta.job && a->meta.job->type == JOB_STOP) {
if (unit_pending_inactive(UNIT(a))) {
log_debug("Suppressing automount request on %s since unit stop is scheduled.", a->meta.id);
automount_send_ready(a, -EHOSTDOWN);
return;
}
+2
View File
@@ -1189,6 +1189,8 @@ static void socket_enter_running(Socket *s, int cfd) {
/* We don't take connections anymore if we are supposed to
* shut down anyway */
if (unit_pending_inactive(UNIT(s))) {
log_debug("Suppressing connection request on %s since unit stop is scheduled.", s->meta.id);
if (cfd >= 0)
close_nointr_nofail(cfd);
else {