git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2473
d4fa192b-c00b-0410-8231-
f00ffab90ce4
AZ(close(child_fds[1]));
child_fds[1] = -1;
- vlu = VLU_New(NULL, child_line);
+ vlu = VLU_New(NULL, child_line, 0);
AN(vlu);
AZ(ev_listen);
#define VLU_H_INCLUDED
typedef int (vlu_f)(void *, const char *);
-struct vlu *VLU_New(void *priv, vlu_f *func);
+struct vlu *VLU_New(void *priv, vlu_f *func, unsigned bufsize);
int VLU_Fd(int fd, struct vlu *l);
int VLU_File(FILE *f, struct vlu *l);
void VLU_Destroy(struct vlu *l);
};
struct vlu *
-VLU_New(void *priv, vlu_f *func)
+VLU_New(void *priv, vlu_f *func, unsigned bufsize)
{
struct vlu *l;
+ if (bufsize == 0)
+ bufsize = BUFSIZ;
ALLOC_OBJ(l, LINEUP_MAGIC);
if (l != NULL) {
l->func = func;
l->priv = priv;
- l->bufl = BUFSIZ - 1;
+ l->bufl = bufsize - 1;
l->buf = malloc(l->bufl + 1);
if (l->buf == NULL) {
FREE_OBJ(l);