who knew that zero-length udp packets are valid?

git.mgm/mediaproxy-ng/2.1
Richard Fuchs 14 years ago
parent 33b7872115
commit e4575cf31f

@ -326,12 +326,9 @@ static void stream_readable(int fd, void *p) {
sinlen = sizeof(ss);
ret = recvfrom(fd, buf, sizeof(buf), 0, (struct sockaddr *) &ss, &sinlen);
if (ret == 0)
goto err;
else if (ret < 0) {
if (ret < 0) {
if (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK)
break;
err:
stream_closed(fd, r);
break;
}

Loading…
Cancel
Save