summaryrefslogtreecommitdiffstats
path: root/src/router/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/router/main.c')
-rw-r--r--src/router/main.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/router/main.c b/src/router/main.c
index 82eeee3..eaf2d95 100644
--- a/src/router/main.c
+++ b/src/router/main.c
@@ -32,6 +32,7 @@
#include "audio.h"
#include "display.h"
+int show_help = 0;
int num_kanal = 1;
static osmo_cc_endpoint_t *cc_ep1 = NULL, *cc_ep2 = NULL;
@@ -85,9 +86,8 @@ static int handle_options(int short_option, int argi, char **argv)
switch (short_option) {
case 'h':
- print_usage(argv[0]);
- print_help();
- return 0;
+ show_help = 1;
+ break;
case 'v':
if (!strcasecmp(argv[argi], "list")) {
debug_list_cat();
@@ -182,6 +182,19 @@ int main(int argc, char *argv[])
argi = options_command_line(argc, argv, handle_options);
if (argi <= 0)
return argi;
+ if (show_help) {
+ if (argi < argc) {
+ routing_help(argv[argi]);
+ return 0;
+ }
+ print_usage(argv[0]);
+ print_help();
+ printf("\n");
+ env_help();
+ printf("\n");
+ routing_help(NULL);
+ return 0;
+ }
/* init osmo-cc endpoint */
cc_ep1 = calloc(1, sizeof(*cc_ep1));