Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions dnsdedupe.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ struct nmsg_msgmod_plugin nmsg_msgmod_ctx = {
.msgtype = { NMSG_VENDOR_SIE_DNSDEDUPE_ID, NMSG_VENDOR_SIE_DNSDEDUPE_NAME },

.pbdescr = &nmsg__sie__dns_dedupe__descriptor,
.fields = dnsdedupe_fields
.fields = dnsdedupe_fields
};

/* Private. */
Expand All @@ -166,7 +166,7 @@ time_print(nmsg_message_t msg,
struct tm gm;

t = *((uint32_t *) ptr);

if (gmtime_r(&t, &gm) != NULL) {
res = nmsg_strbuf_append(sb, "%s: %d-%02d-%02d %02d:%02d:%02d%s",
field->name,
Expand Down Expand Up @@ -230,6 +230,10 @@ time_parse(nmsg_message_t m,
}

t = malloc(sizeof(*t));
if (t == NULL) {
return (nmsg_res_memfail);
}

*t = timegm(&gm);

*ptr = t;
Expand Down Expand Up @@ -454,7 +458,6 @@ dns_class_parse(nmsg_message_t m,
}

*rrclass = wdns_str_to_rrclass(value);
*rrclass = WDNS_CLASS_IN;
if (*rrclass == 0) {
free(rrclass);
return (nmsg_res_parse_error);
Expand Down