Send all packets in all paths
This commit is contained in:
27
mud.c
27
mud.c
@@ -515,21 +515,24 @@ int mud_push (struct mud *mud)
|
|||||||
|
|
||||||
mud->tx.start++;
|
mud->tx.start++;
|
||||||
|
|
||||||
struct path *path = mud->path;
|
struct path *path;
|
||||||
ssize_t ret = mud_send_path(path, packet->data, packet->size);
|
|
||||||
|
|
||||||
if (ret <= 0)
|
for (path = mud->path; path; path = path->next) {
|
||||||
continue;
|
ssize_t ret = mud_send_path(path, packet->data, packet->size);
|
||||||
|
|
||||||
if (ret != packet->size)
|
if (ret <= 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (path->send.count == 256) {
|
if (ret != packet->size)
|
||||||
path->send.count = 0;
|
continue;
|
||||||
path->send.dt = (now-path->send.time)>>8;
|
|
||||||
path->send.time = now;
|
if (path->send.count == 256) {
|
||||||
} else {
|
path->send.count = 0;
|
||||||
path->send.count++;
|
path->send.dt = (now-path->send.time)>>8;
|
||||||
|
path->send.time = now;
|
||||||
|
} else {
|
||||||
|
path->send.count++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user