Commit Diff
Diff:
e598514906f85ddc8111c9aea61ac622dace61f4
c08c431f3bb99dabd59799318e159bd430a866ea
Commit:
c08c431f3bb99dabd59799318e159bd430a866ea
Tree:
358bbb266dbd0f4035f62202b1a8125f749b97a6
Author:
pjp <pjp@delphinusdns.org>
Committer:
pjp <pjp@delphinusdns.org>
Date:
Mon Nov 4 09:17:02 2019 UTC
Message:
give out human readable time instead of timestamp ban a lot of debug into #if DEBUG's
blob - 1be9d99e932c1a9ee5a195b36ccb7f8afe5cb46c
blob + fe92a46f9b69048782d27a686d08ffd9721b18e3
--- parse.y
+++ parse.y
@@ -21,7 +21,7 @@
*/
/*
- * $Id: parse.y,v 1.79 2019/11/04 07:00:41 pjp Exp $
+ * $Id: parse.y,v 1.80 2019/11/04 09:17:02 pjp Exp $
*/
%{
@@ -806,8 +806,10 @@ zonestatement:
return -1;
}
+#if DEBUG
if (debug)
printf("%s SOA\n", $1);
+#endif
} else {
if (debug)
printf("soa error\n");
@@ -845,8 +847,10 @@ zonestatement:
if (fill_srv($1, $3, $5, $7, $9, $11, $13) < 0) {
return -1;
}
+#if DEBUG
if (debug)
printf("SRV\n");
+#endif
} else {
if (debug)
@@ -867,24 +871,30 @@ zonestatement:
return -1;
}
+#if DEBUG
if (debug)
printf("%s NS\n", $1);
+#endif
} else if (strcasecmp($3, "ptr") == 0) {
if (fill_ptr($1, $3, $5, $7) < 0) {
return -1;
}
+#if DEBUG
if (debug)
printf("%s PTR\n", $1);
+#endif
} else if (strcasecmp($3, "cname") == 0) {
if (fill_cname($1, $3, $5, $7) < 0) {
return -1;
}
+#if DEBUG
if (debug)
printf("%s CNAME\n", $3);
+#endif
} else {
if (debug)
@@ -903,8 +913,10 @@ zonestatement:
return -1;
}
+#if DEBUG
if (debug)
printf("%s AAAA\n", $1);
+#endif
} else {
if (debug)
@@ -923,8 +935,10 @@ zonestatement:
return -1;
}
+#if DEBUG
if (debug)
printf("%s A\n", $1);
+#endif
} else {
if (debug)
@@ -944,8 +958,10 @@ zonestatement:
return -1;
}
+#if DEBUG
if (debug)
printf("%s MX -> %lld %s\n", $1, $7, $9);
+#endif
} else {
if (debug)
@@ -965,8 +981,10 @@ zonestatement:
return -1;
}
+#if DEBUG
if (debug)
printf(" %s TXT -> %s\n", $1, $7);
+#endif
} else {
if (debug)
printf("another txt like record I don't know?\n");
@@ -985,8 +1003,10 @@ zonestatement:
return -1;
}
+#if DEBUG
if (debug)
printf(" %s NAPTR\n", $1);
+#endif
} else {
if (debug)
printf("another naptr like record I don't know?\n");
@@ -1012,26 +1032,34 @@ zonestatement:
return -1;
}
+#if DEBUG
if (debug)
printf(" %s DNSKEY\n", $1);
+#endif
} else if (strcasecmp($3, "ds") == 0) {
if (fill_ds($1, $3, $5, $7, $9, $11, $13) < 0) {
return -1;
}
+#if DEBUG
if (debug)
printf(" %s DS\n", $1);
+#endif
} else if (strcasecmp($3, "nsec3param") == 0) {
if (fill_nsec3param($1, $3, $5, $7, $9, $11, $13) < 0) {
return -1;
}
+#if DEBUG
if (debug)
printf(" %s NSEC3PARAM\n", $1);
+#endif
} else if (strcasecmp($3, "tlsa") == 0) {
if (fill_tlsa($1, $3, $5, $7, $9, $11, $13) < 0) {
return -1;
}
+#if DEBUG
if (debug)
printf(" %s TLSA\n", $1);
+#endif
} else {
if (debug)
printf("another dnskey like record I don't know?\n");
@@ -1055,8 +1083,10 @@ zonestatement:
return -1;
}
+#if DEBUG
if (debug)
printf(" %s RRSIG\n", $1);
+#endif
} else {
if (debug)
printf("another rrsig like record I don't know?\n");
@@ -1081,8 +1111,10 @@ zonestatement:
return -1;
}
+#if DEBUG
if (debug)
printf(" %s NSEC\n", $1);
+#endif
} else {
if (debug)
printf("another nsec like record I don't know?\n");
@@ -1106,8 +1138,10 @@ zonestatement:
return -1;
}
+#if DEBUG
if (debug)
printf(" %s NSEC3\n", $1);
+#endif
}
blob - 0bc1065d3bf183ff275cbbea1664801581210844
blob + 02ed6d80a880436c2b9c6d8a242555d51ff8febc
--- raxfr.c
+++ raxfr.c
@@ -26,7 +26,7 @@
*
*/
/*
- * $Id: raxfr.c,v 1.23 2019/11/04 07:00:41 pjp Exp $
+ * $Id: raxfr.c,v 1.24 2019/11/04 09:17:02 pjp Exp $
*/
#include <sys/types.h>
@@ -1596,7 +1596,7 @@ schedule_restart(char *zonename, time_t seconds)
LIST_INSERT_HEAD(&myschedules, sp0, myschedule_entry);
- dolog(LOG_INFO, "scheduling restart at %lu\n", seconds);
+ dolog(LOG_INFO, "scheduling restart at %s", ctime(&seconds));
}
static void
blob - 3dab4938782baf6f999affcbe7ee6a22c156bc95
blob + 507020a8d3672e6a2a07dfeed1ce3599a4615bab
--- util.c
+++ util.c
@@ -27,7 +27,7 @@
*/
/*
- * $Id: util.c,v 1.45 2019/11/04 07:00:41 pjp Exp $
+ * $Id: util.c,v 1.46 2019/11/04 09:17:02 pjp Exp $
*/
#include <sys/types.h>
@@ -304,8 +304,10 @@ dns_label(char *name, int *returnlen)
p++;
}
+#if DEBUG
if (debug)
dolog(LOG_DEBUG, "converting name= %s\n", name);
+#endif
return dnslabel;
}
repomaster@centroid.eu