Use newly added descriptors_assert() function to ensure only expected

descriptors are open.

MFC after:	1 week
This commit is contained in:
Pawel Jakub Dawidek 2011-01-28 21:57:42 +00:00
parent 579fd4b2ff
commit f463896e5e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=218045
2 changed files with 4 additions and 0 deletions

View File

@ -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);

View File

@ -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);