assert(0);
strncpy((char *)msg->data.ntp_source.name, data.name,
sizeof (msg->data.ntp_source.name));
- msg->data.ntp_source.port = htonl((unsigned long) data.port);
+ msg->data.ntp_source.port = htonl(data.port);
msg->data.ntp_source.minpoll = htonl(data.params.minpoll);
msg->data.ntp_source.maxpoll = htonl(data.params.maxpoll);
msg->data.ntp_source.presend_minpoll = htonl(data.params.presend_minpoll);
return;
}
- port = (unsigned short)(ntohl(rx_message->data.ntp_source.port));
+ port = ntohl(rx_message->data.ntp_source.port);
params.minpoll = ntohl(rx_message->data.ntp_source.minpoll);
params.maxpoll = ntohl(rx_message->data.ntp_source.maxpoll);
params.presend_minpoll = ntohl(rx_message->data.ntp_source.presend_minpoll);
IPAddr loopback_addr, remote_ip;
int read_length, expected_length;
int localhost, allowed, log_index;
- unsigned short rx_command;
+ uint16_t rx_command;
struct timespec now, cooked_now;
sck_message = SCK_ReceiveMessage(sock_fd, 0);
if (sscanf(line, "%lf%n", &src->params.offset, &n) != 1)
return 0;
} else if (!strcasecmp(cmd, "port")) {
- if (sscanf(line, "%hu%n", &src->port, &n) != 1)
+ if (sscanf(line, "%d%n", &src->port, &n) != 1)
return 0;
} else if (!strcasecmp(cmd, "polltarget")) {
if (sscanf(line, "%d%n", &src->params.poll_target, &n) != 1)
typedef struct {
char *name;
- unsigned short port;
+ int port;
SourceParameters params;
} CPS_NTP_Source;
typedef struct {
struct timespec ref_time;
- unsigned short n_samples;
- unsigned short n_runs;
+ unsigned long n_samples;
+ unsigned long n_runs;
unsigned long span_seconds;
double rtc_seconds_fast;
double rtc_gain_rate_ppm;