clean up some debug logging

This commit is contained in:
Grant Limberg 2020-08-12 09:16:18 -07:00
commit 30b18d925f
No known key found for this signature in database
GPG key ID: 2BA62CCABBB4095A
4 changed files with 1 additions and 19 deletions

View file

@ -6,11 +6,6 @@
namespace ZeroTier {
void MacDNSHelper::doTheThing()
{
fprintf(stderr, "\n\nDOING THE THING!!\n\n");
}
void MacDNSHelper::setDNS(uint64_t nwid, const char *domain, const std::vector<InetAddress> &servers)
{
SCDynamicStoreRef ds = SCDynamicStoreCreate(NULL, CFSTR("zerotier"), NULL, NULL);
@ -49,15 +44,11 @@ void MacDNSHelper::setDNS(uint64_t nwid, const char *domain, const std::vector<I
CFIndex i = 0, j = CFArrayGetCount(list);
bool ret = TRUE;
if (j <= 0) {
fprintf(stderr, "Key '%s' does not exist. Creating.\n", buf);
ret &= SCDynamicStoreAddValue(ds, key, dict);
} else {
fprintf(stderr, "Key '%s' already exists. Updating DNS config.\n", buf);
ret &= SCDynamicStoreSetValue(ds, (CFStringRef)CFArrayGetValueAtIndex(list, i), dict);
}
if (ret) {
fprintf(stderr, "DNS written successfully\n");
} else {
if (!ret) {
fprintf(stderr, "Error writing DNS configuration\n");
}