Skip to content
Snippets Groups Projects
Commit 43cfb133 authored by Daniel Salzman's avatar Daniel Salzman
Browse files

Change xfr_serial type to uint32_t

refs #2137
parent 20840d64
No related branches found
No related tags found
No related merge requests found
......@@ -220,7 +220,9 @@ int params_parse_class(const char *rclass, uint16_t *class_num)
return KNOT_EOK;
}
int params_parse_type(const char *rtype, int32_t *type_num, int64_t *xfr_serial)
int params_parse_type(const char *rtype,
int32_t *type_num,
uint32_t *xfr_serial)
{
if (rtype == NULL || type_num == NULL || xfr_serial == NULL) {
return KNOT_EINVAL;
......
......@@ -91,8 +91,8 @@ typedef struct {
int32_t type_num;
/*!< Default TTL. */
uint32_t ttl;
/*!< Default SOA serial for XFR (32unsigned + -1 uninitialized). */
int64_t xfr_serial;
/*!< Default SOA serial for XFR. */
uint32_t xfr_serial;
/*!< UDP buffer size. */
uint32_t udp_size;
/*!< Number of UDP retries. */
......@@ -127,7 +127,9 @@ void params_flag_verbose(params_t *params);
int params_parse_class(const char *rclass, uint16_t *class_num);
int params_parse_type(const char *rtype, int32_t *type_num, int64_t *xfr_serial);
int params_parse_type(const char *rtype,
int32_t *type_num,
uint32_t *xfr_serial);
int params_parse_server(list *servers, const char *name);
......
......@@ -44,7 +44,7 @@ query_t* query_create(const char *name, const uint16_t type)
// Fill output.
query->name = strdup(name);
query->type = type;
query->xfr_serial = -1;
query->xfr_serial = 0;
return query;
}
......@@ -85,7 +85,7 @@ static int dig_params_init(params_t *params)
params->udp_size = DEFAULT_UDP_SIZE;
params->class_num = KNOT_CLASS_IN;
params->type_num = -1;
params->xfr_serial = -1;
params->xfr_serial = 0;
params->retries = DEFAULT_RETRIES_DIG;
params->wait = DEFAULT_TIMEOUT_DIG;
params->servfail_stop = false;
......
......@@ -40,7 +40,7 @@ typedef struct {
/*!< Type number to query on. */
uint16_t type;
/*!< SOA serial for XFR. */
int64_t xfr_serial;
uint32_t xfr_serial;
} query_t;
/*! \brief dig-specific params data. */
......
......@@ -52,7 +52,7 @@ static int host_params_init(params_t *params)
params->udp_size = DEFAULT_UDP_SIZE;
params->class_num = KNOT_CLASS_IN;
params->type_num = -1;
params->xfr_serial = -1;
params->xfr_serial = 0;
params->retries = DEFAULT_RETRIES_HOST;
params->wait = DEFAULT_TIMEOUT_HOST;
params->servfail_stop = false;
......
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