NMT: Fix hint and list of traffic area configuration

This commit is contained in:
Andreas Eversberg 2016-03-26 18:42:38 +01:00
parent 4d84da31a8
commit 17a93b501b
2 changed files with 9 additions and 5 deletions

View File

@ -191,6 +191,7 @@ int main(int argc, char *argv[])
int rc;
int skip_args;
const char *station_id = "";
int mandatory = 0;
/* init common tones */
init_nmt_tones();
@ -204,13 +205,16 @@ int main(int argc, char *argv[])
station_id = argv[1];
if (!kanal) {
printf("No channel (\"Kanal\") is specified, I suggest channel 1.\n\n");
print_help(argv[0]);
return 0;
printf("No channel (\"Kanal\") is specified, I suggest channel 1 (-k 1).\n\n");
mandatory = 1;
}
if (!traffic_area[0]) {
printf("No traffic area is specified, I suggest to use 'SE' for Sweden and set the phone's roaming to 'SE' also.\n\n");
printf("No traffic area is specified, I suggest to use Sweden (-y SE,1) and set the phone's roaming to 'SE' also.\n\n");
mandatory = 1;
}
if (mandatory) {
print_help(argv[0]);
return 0;
}

View File

@ -258,7 +258,7 @@ void nmt_country_list(void)
printf("TA\tShort\tCountry (Provider)\n");
printf("------------------------------------------------------------------------\n");
for (i = 0; nmt_country[i].short_name; i++) {
if (nmt_country[i].short_name[0])
if (nmt_country[i].long_name[0])
printf("%d\t%s\t%s (%s)\n", nmt_country[i].y, nmt_country[i].short_name, nmt_country[i].long_name, nmt_country[i].provider_name);
else
printf("%d\t%s\n", nmt_country[i].y, nmt_country[i].short_name);