Use mud_add_path()

Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
This commit is contained in:
Adrien Gallouët
2018-01-24 16:29:51 +00:00
parent 0c3c2ca28b
commit 36e9a5d57d
2 changed files with 10 additions and 10 deletions

2
mud

Submodule mud updated: a6555c8ab1...7c90d54b91

View File

@@ -335,9 +335,14 @@ main(int argc, char **argv)
} }
if (gt.host && gt.port) { if (gt.host && gt.port) {
if (mud_peer(mud, gt.host, gt.port)) {
perror("mud_peer");
return 1;
}
if (gt.bind.backup) { if (gt.bind.backup) {
if (mud_peer(mud, gt.bind.backup, gt.host, gt.port, 1)) { if (mud_add_path(mud, gt.bind.backup, 1)) {
perror("mud_peer (backup)"); perror("mud_add_path (backup)");
return 1; return 1;
} }
} }
@@ -357,18 +362,13 @@ main(int argc, char **argv)
if (*p) if (*p)
*p++ = 0; *p++ = 0;
if (mud_peer(mud, name, gt.host, gt.port, 0)) { if (mud_add_path(mud, name, 0)) {
perror("mud_peer (bind)"); perror("mud_add_path");
return 1; return 1;
} }
name = p; name = p;
} }
} else {
if (mud_peer(mud, NULL, gt.host, gt.port, 0)) {
perror("mud_peer");
return 1;
}
} }
} }