Skip to content

Commit

Permalink
More limit stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Sep 10, 2013
1 parent e9c0173 commit 7f718a1
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/main/radsniff.c
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,17 @@ static void rs_got_packet(UNUSED fr_event_list_t *events, UNUSED int fd, void *c
return;
}

rs_packet_process(event, header, data);
count++;
rs_packet_process(count, event, header, data);

/*
* We've hit our capture limit, break out of the event loop
*/
if ((conf->limit > 0) && (count >= conf->limit)) {
INFO("Captured %i packets, exiting...", count);
fr_event_loop_exit(events, 1);
return;
}
}
}

Expand Down

0 comments on commit 7f718a1

Please sign in to comment.