Skip to content

Commit

Permalink
Fix help print (--help), '?' is reserved in getopt.
Browse files Browse the repository at this point in the history
Broken due to 16f2a8f
  • Loading branch information
ValdikSS committed Aug 15, 2024
1 parent a6c7169 commit 7b66094
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/goodbyedpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ static struct option long_options[] = {
{"native-frag", no_argument, 0, '*' },
{"reverse-frag",no_argument, 0, '(' },
{"max-payload", optional_argument, 0, '|' },
{"debug-exit", optional_argument, 0, '?' },
{"debug-exit", optional_argument, 0, 'x' },
{0, 0, 0, 0 }
};

Expand Down Expand Up @@ -940,7 +940,7 @@ int main(int argc, char *argv[]) {
else
max_payload_size = 1200;
break;
case '?': // --debug-exit
case 'x': // --debug-exit
debug_exit = true;
break;
default:
Expand Down Expand Up @@ -1123,6 +1123,7 @@ int main(int argc, char *argv[]) {
die();
}
if (debug_exit) {
printf("Debug Exit\n");
exit(EXIT_SUCCESS);
}
printf("Filter activated, GoodbyeDPI is now running!\n");
Expand Down

0 comments on commit 7b66094

Please sign in to comment.