-
Notifications
You must be signed in to change notification settings - Fork 633
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[master] Refactor sending of dead host status #807
[master] Refactor sending of dead host status #807
Conversation
src/attack.c
Outdated
* @return 0 on success, -1 on failure. | ||
*/ | ||
static int | ||
comm_send_status_host_dead (kb_t main_kb, char *hostname) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use ip_str instead of hostname, since we are using the IP. Also, this change would fix the typo in the docstring.
comm_send_status_host_dead (kb_t main_kb, char *hostname) | |
comm_send_status_host_dead (kb_t main_kb, char *ip_str) |
src/attack.c
Outdated
* for implicit singalling that the host ist dead. | ||
* | ||
* @param main_kb Kb to use | ||
* @param hostnae ip_str representation of host |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use ip_str.
* @param hostnae ip_str representation of host | |
* @param ip_str ip_str representation of host |
src/attack.c
Outdated
@@ -511,10 +558,7 @@ attack_host (struct scan_globals *globals, struct in6_addr *ip, GSList *vhosts, | |||
"<description/><type/><name/></source></detail></host>", | |||
ip_str); | |||
#if (PROGRESS_BAR_STYLE == 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove this preprocessor directive. It is always set to 1 and other modules does not hanlde other option than this for dead hosts.. The DEFINE is above in the same file.
Separate sending of progress status and sending of this special status case.
7815440
to
b14e678
Compare
What:
Refactor sending of dead host status. Its only a first small improvement. This will be improved more in the future.
Why:
Separate sending of progress status and sending of
this special status case.
How:
Checklist: