cmdmon: define new types for CLIENT_ACCESSES_BY_INDEX command

There was an incompatible change in the client access report. To avoid
bumping the protocol version drop support for the original request/reply
types and define new CLIENT_ACCESSES_BY_INDEX2 types as a newer version
of the command.
This commit is contained in:
Miroslav Lichvar
2016-01-29 15:46:56 +01:00
parent 6e4dd9302d
commit 705e32acdc
4 changed files with 14 additions and 9 deletions

View File

@@ -2098,11 +2098,11 @@ process_cmd_clients(char *line)
"===============================================================================\n");
while (1) {
request.command = htons(REQ_CLIENT_ACCESSES_BY_INDEX);
request.command = htons(REQ_CLIENT_ACCESSES_BY_INDEX2);
request.data.client_accesses_by_index.first_index = htonl(next_index);
request.data.client_accesses_by_index.n_clients = htonl(MAX_CLIENT_ACCESSES);
if (!request_reply(&request, &reply, RPY_CLIENT_ACCESSES_BY_INDEX, 0))
if (!request_reply(&request, &reply, RPY_CLIENT_ACCESSES_BY_INDEX2, 0))
return 0;
n_clients = ntohl(reply.data.client_accesses_by_index.n_clients);