Replace number and total fields in cmdmon reply packet with padding

They were not used for anything and there is no plan to change that.
This commit is contained in:
Miroslav Lichvar 2014-01-21 19:10:46 +01:00
parent 2fc3525fdf
commit 3f507b782c
3 changed files with 7 additions and 8 deletions

View file

@ -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

View file

@ -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));

View file

@ -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