Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-12-30 18:25:35 +0400
committerFelix Fietkau <nbd@openwrt.org>2012-12-30 18:25:35 +0400
commit975ac3e5e30f1106b6b4ea69c8cbf10c7ce8483e (patch)
treea1e4b8958242fd4aab83daed7e2bf5d4e66aa9a5 /ustream.h
parent4d0a00c82c77a9395c992841237e2c06c4606a5e (diff)
ustream: add ustream_read_buf_full() helper
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'ustream.h')
-rw-r--r--ustream.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/ustream.h b/ustream.h
index 2df429c..a1502af 100644
--- a/ustream.h
+++ b/ustream.h
@@ -163,6 +163,11 @@ static inline bool ustream_read_blocked(struct ustream *s)
return !!(s->read_blocked & READ_BLOCKED_USER);
}
+static inline bool ustream_read_buf_full(struct ustream *s)
+{
+ return s->r.data_bytes == s->r.buffer_len;
+}
+
/*** --- functions only used by ustream implementations --- ***/
/* ustream_init_defaults: fill default callbacks and options */