summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2011-01-28 21:57:42 +0000
committerpjd <pjd@FreeBSD.org>2011-01-28 21:57:42 +0000
commit1c97582ecb99e9cadb0a4dfceaeda6c4c12e8397 (patch)
tree5c3d241aefeffa8af18a1c581d302c120f8141e5 /sbin
parentece917399958b2153172f12dcb1b8c61f505ee4e (diff)
downloadFreeBSD-src-1c97582ecb99e9cadb0a4dfceaeda6c4c12e8397.zip
FreeBSD-src-1c97582ecb99e9cadb0a4dfceaeda6c4c12e8397.tar.gz
Use newly added descriptors_assert() function to ensure only expected
descriptors are open. MFC after: 1 week
Diffstat (limited to 'sbin')
-rw-r--r--sbin/hastd/primary.c2
-rw-r--r--sbin/hastd/secondary.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/sbin/hastd/primary.c b/sbin/hastd/primary.c
index 94fbe34..e22ef82 100644
--- a/sbin/hastd/primary.c
+++ b/sbin/hastd/primary.c
@@ -837,6 +837,8 @@ hastd_primary(struct hast_resource *res)
proto_recv(res->hr_ctrl, NULL, 0);
descriptors_cleanup(res);
+ descriptors_assert(res, mode);
+
pjdlog_init(mode);
pjdlog_prefix_set("[%s] (%s) ", res->hr_name, role2str(res->hr_role));
setproctitle("%s (primary)", res->hr_name);
diff --git a/sbin/hastd/secondary.c b/sbin/hastd/secondary.c
index ae11792..821d5c7 100644
--- a/sbin/hastd/secondary.c
+++ b/sbin/hastd/secondary.c
@@ -395,6 +395,8 @@ hastd_secondary(struct hast_resource *res, struct nv *nvin)
proto_recv(res->hr_ctrl, NULL, 0);
descriptors_cleanup(res);
+ descriptors_assert(res, mode);
+
pjdlog_init(mode);
pjdlog_prefix_set("[%s] (%s) ", res->hr_name, role2str(res->hr_role));
setproctitle("%s (secondary)", res->hr_name);
OpenPOWER on IntegriCloud