Fix a bug in donar CLI
This commit is contained in:
parent
c5dfffe08d
commit
5e042d57ce
1 changed files with 2 additions and 2 deletions
|
@ -62,11 +62,11 @@ int main(int argc, char** argv) {
|
||||||
|
|
||||||
if (is_server) {
|
if (is_server) {
|
||||||
struct donar_server_ctx ctx;
|
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);
|
donar_server(&ctx, &as, exposed_ports, remote_ports);
|
||||||
} else if (is_client) {
|
} else if (is_client) {
|
||||||
struct donar_client_ctx ctx;
|
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);
|
donar_client(&ctx, &as, onion_file, exposed_ports, remote_ports);
|
||||||
}
|
}
|
||||||
goto terminate;
|
goto terminate;
|
||||||
|
|
Loading…
Reference in a new issue