Send all packets in all paths

This commit is contained in:
angt
2016-02-04 08:37:17 +01:00
parent c4fe9fead7
commit 8600bb625a

27
mud.c
View File

@@ -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++;
}
} }
} }