- struct private_dccp_recv_data *pdd = rn->private_data;
-
- if (rn->output_error && *rn->output_error < 0) {
- t->error = *rn->output_error;
- return;
+ struct btr_node *btrn = rn->btrn;
+ struct iovec iov[2];
+ int ret, iovcnt;
+ size_t num_bytes;
+
+ ret = btr_node_status(btrn, 0, BTR_NT_ROOT);
+ if (ret <= 0)
+ goto out;
+ iovcnt = btr_pool_get_buffers(rn->btrp, iov);
+ ret = -E_DCCP_OVERRUN;
+ if (iovcnt == 0)
+ goto out;
+ ret = readv_nonblock(rn->fd, iov, iovcnt, &s->rfds, &num_bytes);
+ if (num_bytes == 0)
+ goto out;
+ if (num_bytes <= iov[0].iov_len) /* only the first buffer was filled */
+ btr_add_output_pool(rn->btrp, num_bytes, btrn);
+ else { /* both buffers contain data */
+ btr_add_output_pool(rn->btrp, iov[0].iov_len, btrn);
+ btr_add_output_pool(rn->btrp, num_bytes - iov[0].iov_len, btrn);