From 38852248c5303a715bd56551d3c666ba05e290f5 Mon Sep 17 00:00:00 2001 From: John Kohl Date: Thu, 23 Jun 1988 06:37:38 +0000 Subject: set up version number manually. --- zhm/zhm.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'zhm/zhm.c') 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"); -- cgit v1.2.3