if (c->v2.outbufsize < c->v2.outbuflen + len) { c->v2.outbufsize = c->v2.outbuflen + len + 1024; c->v2.outbuffer = srealloc(c->v2.outbuffer, c->v2.outbufsize); } memcpy(c->v2.outbuffer + c->v2.outbuflen, buf, len); c->v2.outbuflen += len;
bufchain_add(&c->v.v2.outbuffer, buf, len);
static void ssh2_add_channel_data(struct ssh_channel *c, char *buf,				  int len){    if (c->v2.outbufsize < c->v2.outbuflen + len) {	c->v2.outbufsize = c->v2.outbuflen + len + 1024;	c->v2.outbuffer = srealloc(c->v2.outbuffer, c->v2.outbufsize);    }    memcpy(c->v2.outbuffer + c->v2.outbuflen, buf, len);    c->v2.outbuflen += len;}