summaryrefslogtreecommitdiff
path: root/zhm
diff options
context:
space:
mode:
authorGravatar John Kohl <jtkohl@mit.edu>1988-06-23 06:37:38 +0000
committerGravatar John Kohl <jtkohl@mit.edu>1988-06-23 06:37:38 +0000
commit38852248c5303a715bd56551d3c666ba05e290f5 (patch)
treeebba25355cc06385bf6a674bea517d87c0934f5b /zhm
parent76a56cff9767ccf9d1e579e808247ef3ad1f5282 (diff)
set up version number manually.
Diffstat (limited to 'zhm')
-rw-r--r--zhm/zhm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/zhm/zhm.c b/zhm/zhm.c
index b24f4af..ec6723c 100644
--- a/zhm/zhm.c
+++ b/zhm/zhm.c
@@ -416,6 +416,7 @@ send_stats(notice, sin)
char *bfr;
char *list[20];
int len, i, nitems = 10;
+ char version[BUFSIZ];
newnotice = *notice;
@@ -449,6 +450,13 @@ send_stats(notice, sin)
list[9] = (char *)malloc(32);
(void)strcpy(list[9], MACHINE);
+ /* Since ZFormatRaw* won't change the version number on notices,
+ we need to set the version number explicitly. This code is taken
+ from Zinternal.c, function Z_FormatHeader */
+ (void) sprintf(version, "%s%d.%d", ZVERSIONHDR, ZVERSIONMAJOR,
+ ZVERSIONMINOR);
+ newnotice.z_version = version;
+
if ((ret = ZFormatRawNoticeList(&newnotice, list, nitems, &bfr,
&len)) != ZERR_NONE) {
syslog(LOG_INFO, "Couldn't format stats packet");