1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-15 04:09:01 +00:00

Updates the Nsock examples, closes #395

This commit is contained in:
abhishek
2016-06-07 15:58:09 +00:00
parent 51c6260f85
commit 57c3760a7c
2 changed files with 9 additions and 9 deletions

View File

@@ -81,7 +81,7 @@ nsock_event_id request_timer(nsock_pool nsp, nsock_ev_handler handler, int timeo
}
int try_cancel_timer(nsock_pool * nsp, int idx, int notify) {
int try_cancel_timer(nsock_pool nsp, int idx, int notify) {
int res;
printf("%ld:Attempting to cancel id %li (idx %d) %s notify.\n", time(NULL), ev_ids[idx], idx, ((notify) ? "WITH" : "WITHOUT"));
@@ -134,7 +134,7 @@ int main(int argc, char *argv[]) {
srand(time(NULL));
/* OK, we start with creating a p00l */
if ((nsp = nsp_new(NULL)) == NULL) {
if ((nsp = nsock_pool_new(NULL)) == NULL) {
fprintf(stderr, "Failed to create new pool. QUITTING.\n");
exit(1);
}
@@ -159,7 +159,7 @@ int main(int argc, char *argv[]) {
}
}
printf("Trying to kill my msp!\n");
nsp_delete(nsp);
nsock_pool_delete(nsp);
printf("SUCCESS -- completed %d l00ps.\n", num_loops);
return 0;