if(newsize > buf->maxsize)
newsize = buf->maxsize;
char *newdata = realloc(buf->data, newsize);
- fprintf(stderr, "%p = realloc(%p, %zu)\n", newdata, buf->data, newsize);
if(!newdata)
return -1;
buf->data = newdata;
buf->size = newsize;
}
- fprintf(stderr, "memcpy(%p, %p, %zu)\n", buf->data + buf->used, data, len);
memcpy(buf->data + buf->used, data, len);
buf->used += len;
return len;
rxd = c->recv(c, data, len);
if(rxd != len) {
// TODO: once we have a receive buffer, handle the application not accepting all data.
- fprintf(stderr, "c->recv(%p, %p, %zu) returned %zd\n", c, data, len, rxd);
abort();
}
if(rxd < 0)