summaryrefslogtreecommitdiff
path: root/rr.c
diff options
context:
space:
mode:
authorMatthijs Mekking <matje@NLnetLabs.nl>2009-10-28 09:18:26 +0100
committerMatthijs Mekking <matje@NLnetLabs.nl>2009-10-28 09:18:26 +0100
commit376c35e1be07779b7a9aa5a06fb315882366df8b (patch)
treeaebbfb13d2a54f951fbf8bf12c626dabda1f45b6 /rr.c
parent8782b1483e0aa450a94179d641222b521cc87924 (diff)
downloadldns-376c35e1be07779b7a9aa5a06fb315882366df8b.tar.gz
explicit ttl's can also be of the period format
Diffstat (limited to 'rr.c')
-rw-r--r--rr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/rr.c b/rr.c
index 10be11e3..30db0c97 100644
--- a/rr.c
+++ b/rr.c
@@ -117,6 +117,7 @@ ldns_rr_new_frm_str_internal(ldns_rr **newrr, const char *str,
const char *delimiters;
ssize_t c;
ldns_rdf *owner_dname;
+ const char* endptr;
/* used for types with unknown number of rdatas */
bool done;
@@ -178,7 +179,7 @@ ldns_rr_new_frm_str_internal(ldns_rr **newrr, const char *str,
ldns_rr_free(new);
return LDNS_STATUS_SYNTAX_TTL_ERR;
}
- ttl_val = (uint32_t) strtol(ttl, NULL, 10);
+ ttl_val = (uint32_t) ldns_str2period(ttl, &endptr);
if (strlen(ttl) > 0 && !isdigit((int) ttl[0])) {
/* ah, it's not there or something */