* =0 : not enough data available. <blk*> are left undefined.
* The buffer is left unaffected. Unused buffers are left in an undefined state.
*/
-static inline size_t b_getblk_nc(const struct buffer *buf, const char **blk1, int *len1, const char **blk2, int *len2, size_t ofs, size_t max)
+static inline size_t b_getblk_nc(const struct buffer *buf, const char **blk1, size_t *len1, const char **blk2, size_t *len2, size_t ofs, size_t max)
{
size_t l1;
int ci_putblk(struct channel *chn, const char *str, int len);
struct buffer *ci_swpbuf(struct channel *chn, struct buffer *buf);
int ci_putchr(struct channel *chn, char c);
-int ci_getline_nc(const struct channel *chn, char **blk1, int *len1, char **blk2, int *len2);
-int ci_getblk_nc(const struct channel *chn, char **blk1, int *len1, char **blk2, int *len2);
+int ci_getline_nc(const struct channel *chn, char **blk1, size_t *len1, char **blk2, size_t *len2);
+int ci_getblk_nc(const struct channel *chn, char **blk1, size_t *len1, char **blk2, size_t *len2);
int co_inject(struct channel *chn, const char *msg, int len);
int co_getline(const struct channel *chn, char *str, int len);
int co_getblk(const struct channel *chn, char *blk, int len, int offset);
-int co_getline_nc(const struct channel *chn, const char **blk1, int *len1, const char **blk2, int *len2);
-int co_getblk_nc(const struct channel *chn, const char **blk1, int *len1, const char **blk2, int *len2);
+int co_getline_nc(const struct channel *chn, const char **blk1, size_t *len1, const char **blk2, size_t *len2);
+int co_getblk_nc(const struct channel *chn, const char **blk1, size_t *len1, const char **blk2, size_t *len2);
/* returns a pointer to the stream the channel belongs to */
* The channel status is not changed. The caller must call co_skip() to
* update it. Unused buffers are left in an undefined state.
*/
-int co_getblk_nc(const struct channel *chn, const char **blk1, int *len1, const char **blk2, int *len2)
+int co_getblk_nc(const struct channel *chn, const char **blk1, size_t *len1, const char **blk2, size_t *len2)
{
if (unlikely(chn->buf->o == 0)) {
if (chn->flags & CF_SHUTW)
* the '\n'. Unused buffers are left in an undefined state.
*/
int co_getline_nc(const struct channel *chn,
- const char **blk1, int *len1,
- const char **blk2, int *len2)
+ const char **blk1, size_t *len1,
+ const char **blk2, size_t *len2)
{
int retcode;
int l;
* <0 : no more bytes readable because input is shut.
*/
int ci_getblk_nc(const struct channel *chn,
- char **blk1, int *len1,
- char **blk2, int *len2)
+ char **blk1, size_t *len1,
+ char **blk2, size_t *len2)
{
if (unlikely(chn->buf->i == 0)) {
if (chn->flags & CF_SHUTR)
* the '\n'. Unused buffers are left in an undefined state.
*/
int ci_getline_nc(const struct channel *chn,
- char **blk1, int *len1,
- char **blk2, int *len2)
+ char **blk1, size_t *len1,
+ char **blk2, size_t *len2)
{
int retcode;
int l;
int wanted = lua_tointeger(L, 2);
struct hlua *hlua = hlua_gethlua(L);
struct appctx *appctx;
- int len;
+ size_t len;
int nblk;
const char *blk1;
- int len1;
+ size_t len1;
const char *blk2;
- int len2;
+ size_t len2;
int skip_at_end = 0;
struct channel *oc;
struct stream_interface *si;
{
char *blk1;
char *blk2;
- int len1;
- int len2;
+ size_t len1;
+ size_t len2;
int ret;
luaL_Buffer b;
{
char *blk1;
char *blk2;
- int len1;
- int len2;
- int len;
+ size_t len1;
+ size_t len2;
+ size_t len;
struct channel *chn;
int ret;
luaL_Buffer b;
struct stream_interface *si = appctx->appctx->owner;
int ret;
const char *blk1;
- int len1;
+ size_t len1;
const char *blk2;
- int len2;
+ size_t len2;
/* Read the maximum amount of data avalaible. */
ret = co_getline_nc(si_oc(si), &blk1, &len1, &blk2, &len2);
{
struct hlua_appctx *appctx = MAY_LJMP(hlua_checkapplet_tcp(L, 1));
struct stream_interface *si = appctx->appctx->owner;
- int len = MAY_LJMP(luaL_checkinteger(L, 2));
+ size_t len = MAY_LJMP(luaL_checkinteger(L, 2));
int ret;
const char *blk1;
- int len1;
+ size_t len1;
const char *blk2;
- int len2;
+ size_t len2;
/* Read the maximum amount of data avalaible. */
ret = co_getblk_nc(si_oc(si), &blk1, &len1, &blk2, &len2);
struct channel *chn = si_ic(si);
int ret;
const char *blk1;
- int len1;
+ size_t len1;
const char *blk2;
- int len2;
+ size_t len2;
/* Maybe we cant send a 100-continue ? */
if (appctx->appctx->ctx.hlua_apphttp.flags & APPLET_100C) {
struct channel *chn = si_ic(si);
int ret;
const char *blk1;
- int len1;
+ size_t len1;
const char *blk2;
- int len2;
+ size_t len2;
/* Maybe we cant send a 100-continue ? */
if (appctx->appctx->ctx.hlua_apphttp.flags & APPLET_100C) {
struct proxy *px = strm->be;
struct hlua *hlua = ctx->ctx.hlua_apphttp.hlua;
const char *blk1;
- int len1;
+ size_t len1;
const char *blk2;
- int len2;
+ size_t len2;
int ret;
/* If the stream is disconnect or closed, ldo nothing. */
int es_now = 0;
int size = 0;
const char *blk1, *blk2;
- int len1, len2;
+ size_t len1, len2;
if (h2c_mux_busy(h2c, h2s)) {
h2s->flags |= H2_SF_BLK_MBUSY;