diff --git a/lib/output.c b/lib/output.c index 54d505d9..e9e58ac8 100644 --- a/lib/output.c +++ b/lib/output.c @@ -164,7 +164,7 @@ int mp_add_subcheck_to_subcheck(mp_subcheck check[static 1], mp_subcheck subchec * Add a manual summary to a mp_check object, effectively replacing * the autogenerated one */ -void mp_add_summary(mp_check check[static 1], char *summary) { check->summary = summary; } +void mp_set_summary(mp_check check[static 1], char *summary) { check->summary = strdup(summary); } /* * Generate the summary string of a mp_check object based on its subchecks diff --git a/lib/output.h b/lib/output.h index f5011268..6ca63cfe 100644 --- a/lib/output.h +++ b/lib/output.h @@ -87,7 +87,7 @@ int mp_add_subcheck_to_subcheck(mp_subcheck check[static 1], mp_subcheck); void mp_add_perfdata_to_subcheck(mp_subcheck check[static 1], mp_perfdata); -void mp_add_summary(mp_check check[static 1], char *summary); +void mp_set_summary(mp_check check[static 1], char *summary); mp_state_enum mp_compute_check_state(mp_check); mp_state_enum mp_compute_subcheck_state(mp_subcheck);