[systemd-commits] src/automount.c src/socket.c
Lennart Poettering
lennart at kemper.freedesktop.org
Tue Jan 25 17:55:51 PST 2011
src/automount.c | 3 ++-
src/socket.c | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 5d909e3ec3f502f1d33d0070d8a7a5755e7615d8
Author: Lennart Poettering <lennart at poettering.net>
Date: Wed Jan 26 02:55:35 2011 +0100
automount: use unit_pending_inactive() where appropriate
diff --git a/src/automount.c b/src/automount.c
index 0ae467c..9447c0d 100644
--- a/src/automount.c
+++ b/src/automount.c
@@ -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;
}
diff --git a/src/socket.c b/src/socket.c
index 4443dba..e386c7f 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -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 {
More information about the systemd-commits
mailing list