mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-15 09:40:06 +00:00
Shaper code cleanup
This commit is contained in:
parent
ebf5462491
commit
5cee98a65c
9 changed files with 69 additions and 67 deletions
|
|
@ -165,7 +165,6 @@ static void* packetPollLoop(void* ptr) {
|
|||
if((rc = pcap_next_ex(pd, &hdr, &pkt)) > 0) {
|
||||
if((rc > 0) && (pkt != NULL) && (hdr->caplen > 0)) {
|
||||
u_int16_t p;
|
||||
bool shaped;
|
||||
|
||||
#ifdef WIN32
|
||||
/*
|
||||
|
|
@ -182,10 +181,10 @@ static void* packetPollLoop(void* ptr) {
|
|||
hdr_copy.len = min(hdr->len, sizeof(pkt_copy) - 1);
|
||||
hdr_copy.caplen = min(hdr_copy.len, hdr_copy.caplen);
|
||||
memcpy(pkt_copy, pkt, hdr_copy.len);
|
||||
iface->dissectPacket(&hdr_copy, (const u_char*)pkt_copy, &shaped, &p);
|
||||
iface->dissectPacket(&hdr_copy, (const u_char*)pkt_copy, &p);
|
||||
#else
|
||||
hdr->caplen = min_val(hdr->caplen, iface->getMTU());
|
||||
iface->dissectPacket(hdr, pkt, &shaped, &p);
|
||||
iface->dissectPacket(hdr, pkt, &p);
|
||||
#endif
|
||||
}
|
||||
} else if(rc < 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue