summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Eichin <eichin@thok.org>2014-07-15 12:01:09 -0400
committerMark Eichin <eichin@thok.org>2014-07-15 12:01:09 -0400
commit319318a8e079fb97bc2c4c3fb9187d5090f9f3ba (patch)
tree9bf5dd04a6a54e1d2344f5a350e50328200d1e11
parentf37b9944a273bf1f6f643da756772591a28fdd69 (diff)
fix the no-heartbeat bugs I reported in 2009 (I have been runningHEADdebian/2.6.15-5.3master
either old or local copies since then.)
-rw-r--r--debian/changelog7
-rw-r--r--tzc.c9
2 files changed, 14 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index c2e96b7..0c742fa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+tzc (2.6.15-5.3) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * tzc.c: fix heartbeat-subscription bugs from 2009. (Closes: #561039)
+
+ -- Mark W. Eichin <eichin@thok.org> Tue, 15 Jul 2014 11:55:58 -0400
+
tzc (2.6.15-5.2) unstable; urgency=low
* Non-maintainer upload.
diff --git a/tzc.c b/tzc.c
index 4eba186..443d303 100644
--- a/tzc.c
+++ b/tzc.c
@@ -1377,7 +1377,9 @@ setup(int use_zctl)
globals->ebuf = (char *) malloc(globals->ebufsiz);
globals->ebufptr = globals->ebuf;
- reset_heartbeat();
+ if (globals->heartbeat.status != HB_DISABLED) {
+ reset_heartbeat();
+ }
globals->pending_replies = NULL;
@@ -1614,7 +1616,9 @@ report_zgram(ZNotice_t *notice, int auth)
}
/* zephyr server is still talking to us, so reset the heartbeat */
- reset_heartbeat();
+ if (globals->heartbeat.status != HB_DISABLED) {
+ reset_heartbeat();
+ }
/* if this is a heartbeat zgram, don't report it */
if (!strcasecmp(notice->z_class, TZC_HEARTBEAT_CLASS) &&
@@ -2012,6 +2016,7 @@ int main(int argc, char *argv[]) {
globals->heartbeat.period = atoi(optarg);
if (globals->heartbeat.period == 0)
globals->heartbeat.status = HB_DISABLED;
+ break;
case 'd':
globals->debug = 1;
break;