Date: Tue, 11 Mar 2008 22:17:40 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 137445 for review Message-ID: <200803112217.m2BMHeJr043080@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=137445 Change 137445 by rwatson@rwatson_cinnamon on 2008/03/11 22:16:50 If the requested timeout is 0, then we want to wait forever, so pass NULL to select() for its timeout rather than an under-initialized timeval. Affected files ... .. //depot/projects/zcopybpf/src/contrib/libpcap/pcap-bpf.c#23 edit Differences ... ==== //depot/projects/zcopybpf/src/contrib/libpcap/pcap-bpf.c#23 (text+ko) ==== @@ -217,7 +217,8 @@ tv.tv_sec = p->to_ms / 1000; tv.tv_usec = (p->to_ms * 1000) % 1000000; } - r = select(p->fd + 1, &r_set, NULL, NULL, &tv); + r = select(p->fd + 1, &r_set, NULL, NULL, p->to_ms != 0 ? &tv : + NULL); if (r < 0 && errno == EINTR) return (0); else if (r < 0) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803112217.m2BMHeJr043080>