]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 3677] additional peer events not decoded in associations listing
authorJuergen Perlinger <perlinger@ntp.org>
Mon, 26 Oct 2020 07:30:46 +0000 (08:30 +0100)
committerJuergen Perlinger <perlinger@ntp.org>
Mon, 26 Oct 2020 07:30:46 +0000 (08:30 +0100)
 - add numeric formatting to default branch

bk: 5f967b26xKoTW2oq2LqfwYpkl28SlQ

ChangeLog
ntpq/ntpq-subs.c

index c5ac712d6b98c697cba387dab3ea2804ac0f32e9..ec773cf39c37b8fe8263c4b13ee5ec098598ef95 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,6 @@
 ---
 * [Bug 3677] additional peer events not decoded in associations listing <perlinger@ntp.org>
-  - patch by Gerry Garvey
+  - original patch by Gerry Garvey
 
 ---
 (4.2.8p15) 2020/06/23 Released by Harlan Stenn <stenn@ntp.org>
index f0eac056c9e1c2472a48d3ec2c31c0802c2671e8..6a0c5daf58fb9e25708b399eb7707b3b42b4b392 100644 (file)
@@ -1186,6 +1186,7 @@ printassoc(
        const char *condition = "";
        const char *last_event;
        char buf[128];
+       char numev[32];
 
        if (numassoc == 0) {
                (void) xprintf(fp, "No association ID's in list\n");
@@ -1352,7 +1353,8 @@ printassoc(
                        break;
 
                default:
-                       last_event = "";
+                       snprintf(numev, sizeof(numev), "<?%x?>", event);
+                       last_event = numev;
                        break;
                }
                snprintf(buf, sizeof(buf),