fix logic inversion
authorFelix Fietkau <nbd@openwrt.org>
Tue, 23 Oct 2012 15:59:52 +0000 (17:59 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 23 Oct 2012 15:59:52 +0000 (17:59 +0200)
ustream-example.c

index 01e3aab2c0c48d22da0ec7d0b320f614959f0bb2..b3cbe763df5c579ff325a0ae79f27f5b0fb836f7 100644 (file)
@@ -75,7 +75,7 @@ static void client_read_cb(struct ustream *s, int bytes)
                cl->ctr += newline + 1 - str;
        } while(1);
 
-       if (s->w.data_bytes > 256 && ustream_read_blocked(s)) {
+       if (s->w.data_bytes > 256 && !ustream_read_blocked(s)) {
                fprintf(stderr, "Block read, bytes: %d\n", s->w.data_bytes);
                ustream_set_read_blocked(s, true);
        }