Project

General

Profile

Bug #1674 » patch.txt

guy, 02/13/2010 08:51 AM

 
--- bpf.c.orig 2010-02-13 00:31:52.000000000 -0800
+++ bpf.c 2010-02-13 00:33:32.000000000 -0800
@@ -421,9 +421,12 @@
* have arrived to fill the store buffer.
*/
while (d->bd_hbuf == NULL) {
- if ((d->bd_immediate || timed_out) && d->bd_slen != 0) {
+ if ((d->bd_immediate || (ap->a_ioflag & IO_NDELAY) || timed_out)
+ && d->bd_slen != 0) {
/*
- * A packet(s) either arrived since the previous
+ * We're in immediate mode, or are reading
+ * in non-blocking mode, and a packet(s)
+ * either arrived since the previous
* read or arrived while we were asleep.
* Rotate the buffers and return what's here.
*/
(3-3/3)