dc = para_calloc(sizeof(struct dccp_client));
ret = para_accept(listen_fd, &dc->addr, sizeof(struct sockaddr_in));
if (ret < 0) {
- PARA_ERROR_LOG("%s", PARA_STRERROR(-ret));
+ PARA_ERROR_LOG("%s\n", PARA_STRERROR(-ret));
return;
}
PARA_NOTICE_LOG("connection from %s\n", inet_ntoa(dc->addr.sin_addr));
}
/*
- * ret: Negative on errors, zero if nothing was written and write would block,
- * number of bytes written else.
+ * ret: Negative on errors, zero if nothing was written and write returned
+ * EAGAIN, number of bytes written else.
*/
static int dccp_write(int fd, const char *buf, size_t len)
{