svn commit: r218045 - head/sbin/hastd
Pawel Jakub Dawidek
pjd at FreeBSD.org
Fri Jan 28 21:57:43 UTC 2011
Author: pjd
Date: Fri Jan 28 21:57:42 2011
New Revision: 218045
URL: http://svn.freebsd.org/changeset/base/218045
Log:
Use newly added descriptors_assert() function to ensure only expected
descriptors are open.
MFC after: 1 week
Modified:
head/sbin/hastd/primary.c
head/sbin/hastd/secondary.c
Modified: head/sbin/hastd/primary.c
==============================================================================
--- head/sbin/hastd/primary.c Fri Jan 28 21:56:47 2011 (r218044)
+++ head/sbin/hastd/primary.c Fri Jan 28 21:57:42 2011 (r218045)
@@ -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);
Modified: head/sbin/hastd/secondary.c
==============================================================================
--- head/sbin/hastd/secondary.c Fri Jan 28 21:56:47 2011 (r218044)
+++ head/sbin/hastd/secondary.c Fri Jan 28 21:57:42 2011 (r218045)
@@ -395,6 +395,8 @@ hastd_secondary(struct hast_resource *re
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);
More information about the svn-src-head
mailing list