Commit c11ac805 authored by Tollef Fog Heen's avatar Tollef Fog Heen

Avoid segfaulting if hitmiss or handling hasn't been set yet

Fall back to "-" if the handling has not been decided yet.

Fixes: #950
Fixes: #944
Fixes: #918
parent 3a0d628c
......@@ -654,11 +654,11 @@ h_ncsa(void *priv, enum VSL_tag_e tag, unsigned fd,
p += 9+15;
break;
} else if (strncmp(what, "hitmiss}x", 9) == 0) {
fprintf(fo, "%s", lp->df_hitmiss);
fprintf(fo, "%s", (lp->df_hitmiss ? lp->df_hitmiss : "-"));
p += 9+8;
break;
} else if (strncmp(what, "handling}x", 10) == 0) {
fprintf(fo, "%s", lp->df_handling);
fprintf(fo, "%s", (lp->df_handling ? lp->df_handling : "-"));
p += 9+9;
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment