static void
handle_del_source(CMD_Request *rx_message, CMD_Reply *tx_message)
{
- NTP_Remote_Address rem_addr;
NSR_Status status;
+ IPAddr ip_addr;
- UTI_IPNetworkToHost(&rx_message->data.del_source.ip_addr, &rem_addr.ip_addr);
- rem_addr.port = 0;
+ UTI_IPNetworkToHost(&rx_message->data.del_source.ip_addr, &ip_addr);
- status = NSR_RemoveSource(&rem_addr);
+ status = NSR_RemoveSource(&ip_addr);
switch (status) {
case NSR_Success:
break;
/* Procedure to remove a source. We don't bother whether the port
address is matched - we're only interested in removing a record for
- the right IP address. Thus the caller can specify the port number
- as zero if it wishes. */
+ the right IP address. */
NSR_Status
-NSR_RemoveSource(NTP_Remote_Address *remote_addr)
+NSR_RemoveSource(IPAddr *address)
{
int slot;
assert(initialised);
- if (find_slot2(remote_addr, &slot) == 0)
+ if (find_slot(address, &slot) == 0)
return NSR_NoSuchSource;
clean_source_record(get_record(slot));
extern void NSR_AutoStartSources(void);
/* Procedure to remove a source */
-extern NSR_Status NSR_RemoveSource(NTP_Remote_Address *remote_addr);
+extern NSR_Status NSR_RemoveSource(IPAddr *address);
/* Procedure to remove all sources */
extern void NSR_RemoveAllSources(void);
}
NSR_Status
-NSR_RemoveSource(NTP_Remote_Address *remote_addr)
+NSR_RemoveSource(IPAddr *address)
{
return NSR_NoSuchSource;
}
for (j = 0; j < sizeof (addrs) / sizeof (addrs[0]); j++) {
DEBUG_LOG("removing source %s", UTI_IPToString(&addrs[j].ip_addr));
- NSR_RemoveSource(&addrs[j]);
+ NSR_RemoveSource(&addrs[j].ip_addr);
for (k = 0; k < sizeof (addrs) / sizeof (addrs[0]); k++) {
found = find_slot2(&addrs[k], &slot);