From 5e042d57ce825a0644fa527823f940c14be2b3c2 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Wed, 20 Feb 2019 16:58:31 +0100 Subject: [PATCH] Fix a bug in donar CLI --- src/donar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/donar.c b/src/donar.c index 6aa704a..825977d 100644 --- a/src/donar.c +++ b/src/donar.c @@ -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;