Skip to content

Commit

Permalink
raop_ntp.c: fixes #192
Browse files Browse the repository at this point in the history
  • Loading branch information
fduncanh committed Apr 18, 2023
1 parent 803217c commit b18cc88
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/raop_ntp.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,15 +290,15 @@ raop_ntp_thread(void *arg)
byteutils_put_ntp_timestamp(request, 24, send_time);
int send_len = sendto(raop_ntp->tsock, (char *)request, sizeof(request), 0,
(struct sockaddr *) &raop_ntp->remote_saddr, raop_ntp->remote_saddr_len);
if (logger_debug) {
char *str = utils_data_to_string(request, send_len, 16);
logger_log(raop_ntp->logger, LOGGER_DEBUG, "\nraop_ntp send time type_t=%d send_len = %d, now = %8.6f\n%s",
request[1] &~0x80, send_len, (double) send_time / SECOND_IN_NSECS, str);
free(str);
}
if (send_len < 0) {
logger_log(raop_ntp->logger, LOGGER_ERR, "raop_ntp error sending request");
} else {
if (logger_debug) {
char *str = utils_data_to_string(request, send_len, 16);
logger_log(raop_ntp->logger, LOGGER_DEBUG, "\nraop_ntp send time type_t=%d send_len = %d, now = %8.6f\n%s",
request[1] &~0x80, send_len, (double) send_time / SECOND_IN_NSECS, str);
free(str);
}
// Read response
response_len = recvfrom(raop_ntp->tsock, (char *)response, sizeof(response), 0,
(struct sockaddr *) &raop_ntp->remote_saddr, &raop_ntp->remote_saddr_len);
Expand Down

0 comments on commit b18cc88

Please sign in to comment.