[i-c] Use htonl/ntohl() to exchange autocal. orders
This commit is contained in:
parent
bdecd07125
commit
97a1e7c72a
|
@ -889,7 +889,7 @@ void order_send(ap_list *ap)
|
|||
cfg_getint(cfg, "autocalibration_port"),
|
||||
&serv, &client) ;
|
||||
|
||||
message.order = AUTOCALIBRATION_ORDER_SEND ;
|
||||
message.order = htonl(AUTOCALIBRATION_ORDER_SEND) ;
|
||||
nsent = sendto(sockfd, (void *)&message, sizeof(message), 0,
|
||||
(struct sockaddr *)&serv, serv_len) ;
|
||||
if (nsent != (ssize_t) sizeof(message))
|
||||
|
|
|
@ -917,7 +917,7 @@ void autocalibrate()
|
|||
continue ;
|
||||
}
|
||||
|
||||
if (message.order == AUTOCALIBRATION_ORDER_SEND)
|
||||
if (ntohl(message.order) == AUTOCALIBRATION_ORDER_SEND)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "I just was ordered to send an autocalibration"
|
||||
|
|
Loading…
Reference in New Issue