diff --git a/mud b/mud index a6555c8..7c90d54 160000 --- a/mud +++ b/mud @@ -1 +1 @@ -Subproject commit a6555c8ab14bf5c59bbeb9e4ac2ce134e640c379 +Subproject commit 7c90d54b911f677c7e95554f748a918e6304e6e7 diff --git a/src/main.c b/src/main.c index 4df7bb2..747c3b9 100644 --- a/src/main.c +++ b/src/main.c @@ -335,9 +335,14 @@ main(int argc, char **argv) } if (gt.host && gt.port) { + if (mud_peer(mud, gt.host, gt.port)) { + perror("mud_peer"); + return 1; + } + if (gt.bind.backup) { - if (mud_peer(mud, gt.bind.backup, gt.host, gt.port, 1)) { - perror("mud_peer (backup)"); + if (mud_add_path(mud, gt.bind.backup, 1)) { + perror("mud_add_path (backup)"); return 1; } } @@ -357,18 +362,13 @@ main(int argc, char **argv) if (*p) *p++ = 0; - if (mud_peer(mud, name, gt.host, gt.port, 0)) { - perror("mud_peer (bind)"); + if (mud_add_path(mud, name, 0)) { + perror("mud_add_path"); return 1; } name = p; } - } else { - if (mud_peer(mud, NULL, gt.host, gt.port, 0)) { - perror("mud_peer"); - return 1; - } } }