Date: Fri, 28 Jan 2011 21:57:42 +0000 (UTC) From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r218045 - head/sbin/hastd Message-ID: <201101282157.p0SLvgvI001613@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101282157.p0SLvgvI001613>