fix: struct were not passed correctly as the argument of *_response
This commit is contained in:
@ -19,11 +19,11 @@ void *routine(void *p_data)
|
||||
port <= thread_data->port_end; port++) {
|
||||
scan_data.port = port;
|
||||
scan_data.response =
|
||||
&thread_data->responses[thread_data->port_start - port];
|
||||
&thread_data->responses[port - thread_data->port_start];
|
||||
if (scan(&scan_data))
|
||||
return NULL;
|
||||
printf("state of port %d: %d\n", port,
|
||||
scan_data.response->state);
|
||||
printf("%d: %s\n", port,
|
||||
scan_data.response->state == 1 ? "OPEN" : "CLOSED");
|
||||
}
|
||||
|
||||
return p_data;
|
||||
|
||||
Reference in New Issue
Block a user