From 5a0f59d6b766cd8aa624f07a2b19f2b377ff51d1 Mon Sep 17 00:00:00 2001 From: Yunchih Chen Date: Tue, 20 Mar 2018 10:25:52 +0800 Subject: Remove pthread cancellation points --- lib/collect.c | 3 --- 1 file changed, 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); -- cgit