diff options
author | John Kohl <jtkohl@mit.edu> | 1988-06-23 06:37:38 +0000 |
---|---|---|
committer | John Kohl <jtkohl@mit.edu> | 1988-06-23 06:37:38 +0000 |
commit | 38852248c5303a715bd56551d3c666ba05e290f5 (patch) | |
tree | ebba25355cc06385bf6a674bea517d87c0934f5b /zhm | |
parent | 76a56cff9767ccf9d1e579e808247ef3ad1f5282 (diff) |
set up version number manually.
Diffstat (limited to 'zhm')
-rw-r--r-- | zhm/zhm.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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"); |