Fix burst command with specified address
This was broken in commit 0f8def4ca4
.
This commit is contained in:
parent
79811bf3e2
commit
066254b6c8
1 changed files with 6 additions and 4 deletions
10
client.c
10
client.c
|
@ -589,18 +589,20 @@ process_cmd_burst(CMD_Request *msg, char *line)
|
|||
s2 = CPS_SplitWord(s1);
|
||||
CPS_SplitWord(s2);
|
||||
|
||||
if (sscanf(s1, "%d/%d", &n_good_samples, &n_total_samples) != 2 ||
|
||||
(*s2 && !read_mask_address(s2, &mask, &address))) {
|
||||
if (sscanf(s1, "%d/%d", &n_good_samples, &n_total_samples) != 2) {
|
||||
fprintf(stderr, "Invalid syntax for burst command\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
mask.family = address.family = IPADDR_UNSPEC;
|
||||
if (*s2 && !read_mask_address(s2, &mask, &address)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
msg->command = htons(REQ_BURST);
|
||||
msg->data.burst.n_good_samples = ntohl(n_good_samples);
|
||||
msg->data.burst.n_total_samples = ntohl(n_total_samples);
|
||||
|
||||
mask.family = address.family = IPADDR_UNSPEC;
|
||||
|
||||
UTI_IPHostToNetwork(&mask, &msg->data.burst.mask);
|
||||
UTI_IPHostToNetwork(&address, &msg->data.burst.address);
|
||||
|
||||
|
|
Loading…
Reference in a new issue