mirror of
https://frontier.innolan.net/rainlance/amiga-ntimed.git
synced 2025-11-22 23:02:32 +00:00
Initial commit
This commit is contained in:
@ -35,6 +35,8 @@
|
||||
#include "udp.h"
|
||||
#include "ntp.h"
|
||||
|
||||
#include "agetaddrinfo.h"
|
||||
|
||||
struct ntp_peer *
|
||||
NTP_Peer_New(const char *hostname, const void *sa, unsigned salen)
|
||||
{
|
||||
@ -78,9 +80,9 @@ NTP_Peer_NewLookup(struct ocx *ocx, const char *hostname)
|
||||
memset(&hints, 0, sizeof hints);
|
||||
hints.ai_family = PF_UNSPEC;
|
||||
hints.ai_socktype = SOCK_DGRAM;
|
||||
error = getaddrinfo(hostname, "ntp", &hints, &res0);
|
||||
error = getaddrinfo(hostname, "123", &hints, &res0);
|
||||
if (error)
|
||||
Fail(ocx, 0, "hostname '%s', port 'ntp': %s\n",
|
||||
Fail(ocx, 0, "hostname '%s', port '123': %s\n",
|
||||
hostname, gai_strerror(error));
|
||||
|
||||
np = NTP_Peer_New(hostname, res0->ai_addr, res0->ai_addrlen);
|
||||
|
||||
Reference in New Issue
Block a user