diff options
author | Yunchih Chen <yunchih.cat@gmail.com> | 2018-03-20 10:25:52 +0800 |
---|---|---|
committer | Yunchih Chen <yunchih.cat@gmail.com> | 2018-03-20 10:28:02 +0800 |
commit | 5a0f59d6b766cd8aa624f07a2b19f2b377ff51d1 (patch) | |
tree | bb1042c36db705a2a49f3be4e622b311c32f7305 | |
parent | e6698bc32ce45dda55823825d837291b5850ac8b (diff) | |
download | nfcollect-5a0f59d6b766cd8aa624f07a2b19f2b377ff51d1.tar.gz nfcollect-5a0f59d6b766cd8aa624f07a2b19f2b377ff51d1.tar.zst nfcollect-5a0f59d6b766cd8aa624f07a2b19f2b377ff51d1.zip |
Remove pthread cancellation points
-rw-r--r-- | lib/collect.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/lib/collect.c b/lib/collect.c index 5ca8139..9a4e52b 100644 --- a/lib/collect.c +++ b/lib/collect.c @@ -51,8 +51,6 @@ static int handle_packet(struct nflog_g_handle *gh, struct nfgenmsg *nfmsg, int payload_len = nflog_get_payload(nfa, &payload); nfl_state_t *nf = (nfl_state_t *)_nf; - pthread_testcancel(); /* cancellation point */ - // only process ipv4 packet if (unlikely(payload_len < 0) || ((payload[0] & 0xf0) != 0x40)) return 1; @@ -143,7 +141,6 @@ void *nfl_collect_worker(void *targs) { int rv; char buf[4096]; while (*p_cnt_now < cnt_max) { - pthread_testcancel(); /* cancellation point */ if ((rv = recv(fd, buf, sizeof(buf), 0)) && rv > 0) { debug("Recv worker #%u: nflog packet received (len=%u)", nf->header->id, rv); |