On Sat, Oct 19, 2013 at 1:16 AM, Yann Ylavic <[email protected]> wrote:

>
> If it breaks things, take a look at the second patch
> "httpd-trunk-util_filter_wouldblock.patch" (attached)
>

+/*
+ * Was the previous call to :
+ *     rv = ap_get_brigade(., bb, .., block, ..)
+ * a non-blocking read which would have blocked?
+ */
+AP_DECLARE(int) ap_got_wouldblock_brigade(apr_status_t rv,
+                                          apr_bucket_brigade *bb,
+                                          apr_read_type_e block)
+{
+    /* ap_get_brigade may return success with an empty brigade
+     * for a non-blocking read which would block.
+     */
+    if (block == APR_NONBLOCK_READ
+            && ((rv == APR_SUCCESS && APR_BRIGADE_EMPTY(bb))
+                    || (APR_STATUS_IS_EAGAIN(rv))));
+}
+

s/if/return/ here of course... silly compiler!

Regards,
> Yann.
>

Reply via email to