diff options
-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"); |