]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Replace number and total fields in cmdmon reply packet with padding
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 21 Jan 2014 18:10:46 +0000 (19:10 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Fri, 24 Jan 2014 15:53:32 +0000 (16:53 +0100)
They were not used for anything and there is no plan to change that.

candm.h
client.c
cmdmon.c

diff --git a/candm.h b/candm.h
index 1ce3da9531b9c10783585f57de4b526b86c42d6a..a044c80da159a11b1554191be7540cb88f597e3d 100644 (file)
--- a/candm.h
+++ b/candm.h
@@ -618,9 +618,9 @@ typedef struct {
   uint16_t command; /* Which command is being replied to */
   uint16_t reply; /* Which format of reply this is */
   uint16_t status; /* Status of command processing */
-  uint16_t number; /* Which packet this is in reply sequence */
-  uint16_t total; /* Number of replies to expect in this sequence */
-  uint16_t pad1; /* Get up to 4 byte alignment */
+  uint16_t pad1; /* Padding for compatibility and 4 byte alignment */
+  uint16_t pad2;
+  uint16_t pad3;
   uint32_t sequence; /* Echo of client's sequence number */
   uint32_t utoken; /* Unique token per incarnation of daemon */
   uint32_t token; /* New command token (only if command was successfully
index b0939a27ab382e8cdb3c20272c281e65de9b758a..467bfdd265309f7cbd227e7f72f62437b8158d0c 100644 (file)
--- a/client.c
+++ b/client.c
@@ -1418,10 +1418,9 @@ submit_request(CMD_Request *request, CMD_Reply *reply, int *reply_auth_ok)
         
         /* Good packet received, print out results */
 #if 0
-        printf("Reply cmd=%d reply=%d stat=%d num=%d tot=%d seq=%d utok=%08lx tok=%d\n",
+        printf("Reply cmd=%d reply=%d stat=%d seq=%d utok=%08lx tok=%d\n",
                ntohs(reply->command), ntohs(reply->reply),
-               ntohs(reply->status), ntohs(reply->number),
-               ntohs(reply->total),
+               ntohs(reply->status),
                ntohl(reply->sequence),
                ntohl(reply->utoken),
                ntohl(reply->token));
index 8ec85f3f4bbc97d9d74525409c9f5cc19dab7edb..9696ff508cce164fb95f24e0a54385675a67440a 100644 (file)
--- a/cmdmon.c
+++ b/cmdmon.c
@@ -1738,9 +1738,9 @@ read_from_cmd_socket(void *anything)
   tx_message.command = rx_message.command;
   tx_message.sequence = rx_message.sequence;
   tx_message.reply = htons(RPY_NULL);
-  tx_message.number = htons(1);
-  tx_message.total = htons(1);
   tx_message.pad1 = 0;
+  tx_message.pad2 = 0;
+  tx_message.pad3 = 0;
   tx_message.utoken = htonl(utoken);
   /* Set this to a default (invalid) value.  This protects against the
      token field being set to an arbitrary value if we reject the