fort_CFLAGS = -Wall -Wno-cpp
# Feel free to temporarily remove this one if you're not using gcc 7.3.0.
#fort_CFLAGS += $(GCC_WARNS)
-fort_CFLAGS += -std=gnu11 -O2 -g $(FORT_FLAGS) ${XML2_CFLAGS}
+fort_CFLAGS += -std=gnu11 -O0 -g $(FORT_FLAGS) ${XML2_CFLAGS}
fort_LDFLAGS = $(LDFLAGS_DEBUG)
fort_LDADD = ${JANSSON_LIBS} ${CURL_LIBS} ${XML2_LIBS}
{
struct hashable_roa *roa;
+ fprintf(stderr, "a");
roa = malloc(sizeof(struct hashable_roa));
- if (roa == NULL)
+ if (roa == NULL) {
+ fprintf(stderr, "b");
return NULL;
+ }
/* Needed by uthash */
+ fprintf(stderr, "c");
memset(roa, 0, sizeof(struct hashable_roa));
roa->data.asn = asn;
{
struct hashable_roa *old;
+ fprintf(stderr, "h");
errno = 0;
HASH_REPLACE(hh, table->roas, data, sizeof(new->data), new, old);
- if (errno)
+ fprintf(stderr, "i");
+ if (errno) {
+ fprintf(stderr, "j");
return -pr_val_errno(errno, "ROA couldn't be added to hash table");
- if (old != NULL)
+ }
+ if (old != NULL) {
+ fprintf(stderr, "k");
free(old);
+ }
+ fprintf(stderr, "l");
return 0;
}
struct hashable_roa *roa;
int error;
+ fprintf(stderr, "\n{");
roa = create_roa(asn, max_length);
- if (roa == NULL)
+ fprintf(stderr, "d");
+ if (roa == NULL) {
+ fprintf(stderr, "e}");
return pr_enomem();
+ }
+ fprintf(stderr, "f");
roa->data.prefix.v4 = prefix4->addr;
roa->data.prefix_length = prefix4->len;
roa->data.addr_fam = AF_INET;
+ fprintf(stderr, "g");
error = add_roa(table, roa);
- if (error)
+ if (error) {
+ fprintf(stderr, "m");
free(roa);
+ }
+
+ fprintf(stderr, "n}");
return error;
}