ftmod_libpri: Print usage if 'ftdm libpri' has no arguments.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
This commit is contained in:
Stefan Knoblich 2011-11-18 22:23:15 +01:00
parent a19352aa23
commit 5897ec5992

View File

@ -310,9 +310,7 @@ static FIO_API_FUNCTION(ftdm_libpri_api)
stream->write_function(stream, ftdm_libpri_usage);
goto done;
}
}
if (argc == 2) {
} else if (argc == 2) {
if (!strcasecmp(argv[0], "kill")) {
int span_id = atoi(argv[1]);
ftdm_span_t *span = NULL;
@ -333,9 +331,7 @@ static FIO_API_FUNCTION(ftdm_libpri_api)
goto done;
}
}
}
if (argc >= 2) {
} else if (argc >= 2) {
if (!strcasecmp(argv[0], "debug")) {
ftdm_span_t *span = NULL;
@ -437,7 +433,10 @@ static FIO_API_FUNCTION(ftdm_libpri_api)
goto done;
}
}
} else {
/* zero args print usage */
stream->write_function(stream, ftdm_libpri_usage);
goto done;
}
stream->write_function(stream, "%s: -ERR invalid command.\n", __FILE__);