Skip to content
Snippets Groups Projects
Commit b9ae00d4 authored by Marek Vavrusa's avatar Marek Vavrusa
Browse files

Default zone file name, updated hex_log().

parent dddcd537
Branches
Tags
No related merge requests found
......@@ -317,9 +317,18 @@ int log_vmsg(logsrc_t src, int level, const char *msg, va_list ap)
void hex_log(int source, const char *data, int length)
{
int ptr = 0;
char lbuf[512]={0}; int llen = 0;
for (; ptr < length; ptr++) {
log_msg(source, LOG_DEBUG, "0x%02x ",
if (ptr > 0 && ptr % 16 == 0) {
lbuf[llen] = '\0';
log_msg(source, LOG_DEBUG, "%s\n", lbuf);
llen = 0;
}
int n = sprintf(lbuf + llen, "0x%02x ",
(unsigned char)*(data + ptr));
llen += n;
}
if (llen > 0) {
log_msg(source, LOG_DEBUG, "%s\n", lbuf);
}
log_msg(source, LOG_DEBUG, "\n");
}
......@@ -179,7 +179,7 @@ static int conf_process(conf_t *conf)
// Default zone file
if (zone->file == NULL) {
zone->file = strcdup(conf->name, ".zone");
zone->file = strcdup(zone->name, ".zone");
}
// Relative zone filenames should be relative to storage
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment