projects
/
fwknop.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
c0aa346
)
minor pcap_capture update to not call atoi() against PCAP_LOOP_SLEEP for every sleep...
author
Michael Rash
<mbr@cipherdyne.org>
Thu, 19 Jul 2012 03:00:58 +0000 (23:00 -0400)
committer
Michael Rash
<mbr@cipherdyne.org>
Thu, 19 Jul 2012 03:00:58 +0000 (23:00 -0400)
server/pcap_capture.c
patch
|
blob
|
history
diff --git
a/server/pcap_capture.c
b/server/pcap_capture.c
index
41eaf90
..
acefd95
100644
(file)
--- a/
server/pcap_capture.c
+++ b/
server/pcap_capture.c
@@
-58,12
+58,15
@@
pcap_capture(fko_srv_options_t *opts)
int promisc = 0;
int set_direction = 1;
int status;
+ int useconds;
pid_t child_pid;
#if FIREWALL_IPFW
time_t now;
#endif
+ useconds = atoi(opts->config[CONF_PCAP_LOOP_SLEEP]);
+
/* Set promiscuous mode if ENABLE_PCAP_PROMISC is set to 'Y'.
*/
if(opts->config[CONF_ENABLE_PCAP_PROMISC][0] == 'Y')
@@
-288,7
+291,7
@@
pcap_capture(fko_srv_options_t *opts)
}
#endif
- usleep(atoi(opts->config[CONF_PCAP_LOOP_SLEEP]));
+ usleep(useconds);
}
pcap_close(pcap);