Also, add a log message on errors/eof.
{
struct private_dccp_recv_data *pdd = rn->private_data;
- if (pdd)
- FD_SET(pdd->fd, rfds);
+ if (!pdd)
+ return -1;
+ FD_SET(pdd->fd, rfds);
return pdd->fd;
}
return -E_DCCP_OVERRUN;
ret = recv_bin_buffer(pdd->fd, rn->buf + rn->loaded,
DCCP_BUFSIZE - rn->loaded);
- if (ret <= 0)
+ if (ret <= 0) {
+ PARA_INFO_LOG("%s\n", ret? PARA_STRERROR(-ret) : "eof");
return ret;
+ }
rn->loaded += ret;
return 1;
}