summaryrefslogtreecommitdiff
path: root/sbin/hastd/hastd.c
diff options
context:
space:
mode:
authorPawel Jakub Dawidek <pjd@FreeBSD.org>2011-03-06 22:56:14 +0000
committerPawel Jakub Dawidek <pjd@FreeBSD.org>2011-03-06 22:56:14 +0000
commit1fee97b01fbbd912fc03db57f8a20c3d6c3fc88d (patch)
tree6b872900bed0ce399d58f54f1a16e39911c78e4b /sbin/hastd/hastd.c
parentea381e691ad3b658f42f1857d4ef448236c006bc (diff)
downloadsrc-test2-1fee97b01fbbd912fc03db57f8a20c3d6c3fc88d.tar.gz
src-test2-1fee97b01fbbd912fc03db57f8a20c3d6c3fc88d.zip
Notes
Diffstat (limited to 'sbin/hastd/hastd.c')
-rw-r--r--sbin/hastd/hastd.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sbin/hastd/hastd.c b/sbin/hastd/hastd.c
index 47b16a1a32fb..c6db672b849f 100644
--- a/sbin/hastd/hastd.c
+++ b/sbin/hastd/hastd.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2009-2010 The FreeBSD Foundation
- * Copyright (c) 2010-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>
+ * Copyright (c) 2010-2011 Pawel Jakub Dawidek <pawel@dawidek.net>
* All rights reserved.
*
* This software was developed by Pawel Jakub Dawidek under sponsorship from
@@ -361,6 +361,8 @@ resource_needs_restart(const struct hast_resource *res0,
return (true);
if (res0->hr_replication != res1->hr_replication)
return (true);
+ if (res0->hr_checksum != res1->hr_checksum)
+ return (true);
if (res0->hr_timeout != res1->hr_timeout)
return (true);
if (strcmp(res0->hr_exec, res1->hr_exec) != 0)
@@ -385,6 +387,8 @@ resource_needs_reload(const struct hast_resource *res0,
return (true);
if (res0->hr_replication != res1->hr_replication)
return (true);
+ if (res0->hr_checksum != res1->hr_checksum)
+ return (true);
if (res0->hr_timeout != res1->hr_timeout)
return (true);
if (strcmp(res0->hr_exec, res1->hr_exec) != 0)
@@ -404,6 +408,7 @@ resource_reload(const struct hast_resource *res)
nv_add_uint8(nvout, HASTCTL_RELOAD, "cmd");
nv_add_string(nvout, res->hr_remoteaddr, "remoteaddr");
nv_add_int32(nvout, (int32_t)res->hr_replication, "replication");
+ nv_add_int32(nvout, (int32_t)res->hr_checksum, "checksum");
nv_add_int32(nvout, (int32_t)res->hr_timeout, "timeout");
nv_add_string(nvout, res->hr_exec, "exec");
if (nv_error(nvout) != 0) {
@@ -562,6 +567,7 @@ hastd_reload(void)
strlcpy(cres->hr_remoteaddr, nres->hr_remoteaddr,
sizeof(cres->hr_remoteaddr));
cres->hr_replication = nres->hr_replication;
+ cres->hr_checksum = nres->hr_checksum;
cres->hr_timeout = nres->hr_timeout;
strlcpy(cres->hr_exec, nres->hr_exec,
sizeof(cres->hr_exec));