Skip to content
Snippets Groups Projects
Commit d0f00a72 authored by Jan Kadlec's avatar Jan Kadlec
Browse files

Added version to dump magic.

parent 5fb829f3
No related branches found
No related tags found
No related merge requests found
......@@ -140,7 +140,7 @@ void dnslib_zone_save_enclosers(dnslib_zone_t *zone, skip_list_t *list)
(void *)&arguments);
}
enum { MAGIC_LENGTH = 4 };
enum { MAGIC_LENGTH = 6 };
/* TODO Think of a better way than a global variable */
static uint node_count = 0;
......@@ -403,8 +403,8 @@ int dnslib_zone_dump_binary(dnslib_zone_t *zone, const char *filename)
dnslib_zone_save_enclosers(zone, encloser_list);
static const uint8_t MAGIC[MAGIC_LENGTH] = {99, 117, 116, 101};
/*c u t e */
static const uint8_t MAGIC[MAGIC_LENGTH] = {99, 117, 116, 101, 0, 1};
/*c u t e 0.1*/
fwrite(&MAGIC, sizeof(uint8_t), MAGIC_LENGTH, f);
......
......@@ -9,7 +9,7 @@
#include "common.h"
#include "debug.h"
enum { MAGIC_LENGTH = 4 };
enum { MAGIC_LENGTH = 6 };
enum { DNAME_MAX_WIRE_LENGTH = 256 };
......@@ -337,8 +337,8 @@ dnslib_zone_t *dnslib_zone_load(const char *filename)
uint auth_node_count;
static const uint8_t MAGIC[MAGIC_LENGTH] = {99, 117, 116, 101};
/*c u t e */
static const uint8_t MAGIC[MAGIC_LENGTH] = {99, 117, 116, 101, 0, 1};
/*c u t e 0.1*/
if (!dnslib_check_magic(f, MAGIC, MAGIC_LENGTH)) {
fprintf(stderr, "Error: unknown file format\n");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment