__LJMP static int hlua_channel_is_full(lua_State *L)
{
struct channel *chn;
- int rem;
MAY_LJMP(check_args(L, 1, "is_full"));
chn = MAY_LJMP(hlua_checkchannel(L, 1));
-
- if (IS_HTX_STRM(chn_strm(chn))) {
- struct htx *htx = htxbuf(&chn->buf);
-
- rem = htx_free_data_space(htx);
- }
- else
- rem = b_room(&chn->buf);
-
- rem -= global.tune.maxrewrite; /* Rewrite reserved size */
-
- lua_pushboolean(L, rem <= 0);
+ /* ignore the reserve, we are not on a producer side (ie in an
+ * applet).
+ */
+ lua_pushboolean(L, channel_full(chn, 0));
return 1;
}