[i-c] Use htonl/ntohl() to exchange autocal. orders

This commit is contained in:
Matteo Cypriani 2010-10-26 10:36:23 +02:00
parent bdecd07125
commit 97a1e7c72a
2 changed files with 2 additions and 2 deletions

View File

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

View File

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