Try to read a little more

This commit is contained in:
angt
2016-02-03 19:49:42 +01:00
parent bfcfd3263e
commit 605b68dad5

4
mud.c
View File

@@ -396,6 +396,7 @@ int mud_pull (struct mud *mud)
struct sock *sock;
for (sock = mud->sock; sock; sock = sock->next) {
for (int i = 0; i < 16; i++) {
unsigned char next = mud->rx.end+1;
if (mud->rx.start == next)
@@ -410,7 +411,7 @@ int mud_pull (struct mud *mud)
0, (struct sockaddr *)&addr, &addrlen);
if (ret <= 0)
continue;
break;
struct path *path = mud_new_path(mud, sock->fd, &addr, addrlen);
@@ -447,6 +448,7 @@ int mud_pull (struct mud *mud)
mud->rx.end = next;
}
}
return 0;
}