Closed nook24 closed 1 year ago
Now there is a comment_hashtable
and a comment_hashlist
. Have you checked if we need both by any chance?
Tbh, I'm not sure if I understand whats happening with comment_hashlist
by 100%. It is only used by comment *get_next_comment_by_host(char *host_name, comment *start)
. I think it is possible to get rid of it but I tried to touched as less code as possible.
How ever, by removing comment_hashlist
we could also delete this:
https://github.com/naemon/naemon-core/blob/47002195d849455863c2fad7f1a440192ef6cce5/src/naemon/shared.c#L416-L437
could you please rebase this PR on the latest HEAD. This should also trigger the checks again.
i just rebased this and had another look. It wont't work like this because the comment_list has only next pointer but no prev. So there is no way to remove something in the middle without walking along all the comment_list again. I guess best would be to add a prev pointer to the comment struct as well, even though this means all NEB modules have to be rebuild again.
i made some changes and created https://github.com/naemon/naemon-core/pull/420
This is my attempt to patch #374. Would be good if you could review this. Signed-off-by: nook24 info@nook24.eu