Fix a bug in donar CLI

This commit is contained in:
Quentin Dufour 2019-02-20 16:58:31 +01:00
parent c5dfffe08d
commit 5e042d57ce

View file

@ -62,11 +62,11 @@ int main(int argc, char** argv) {
if (is_server) {
struct donar_server_ctx ctx;
if (exposed_ports->len < 1 && remote_ports->len) goto in_error;
if (exposed_ports->len < 1 && remote_ports->len < 1) goto in_error;
donar_server(&ctx, &as, exposed_ports, remote_ports);
} else if (is_client) {
struct donar_client_ctx ctx;
if ((exposed_ports->len < 1 && remote_ports->len) || onion_file == NULL) goto in_error;
if ((exposed_ports->len < 1 && remote_ports->len < 1) || onion_file == NULL) goto in_error;
donar_client(&ctx, &as, onion_file, exposed_ports, remote_ports);
}
goto terminate;