Merge remote branch 'origin/master' into on-waves/bsc-master

This commit is contained in:
Holger Hans Peter Freyther
2010-03-25 02:58:57 +01:00
2 changed files with 10 additions and 3 deletions

View File

@@ -76,12 +76,15 @@ static void print_help()
printf(" Some useful help...\n");
printf(" -h --help this text\n");
printf(" -d option --debug=DRLL:DCC:DMM:DRR:DRSL:DNM enable debugging\n");
printf(" -s --disable-color\n");
printf(" -c --config-file filename The config file to use.\n");
printf(" -s --disable-color\n");
printf(" -l --database db-name The database to use\n");
printf(" -a --authorize-everyone. Authorize every new subscriber. Dangerous!.\n");
printf(" -p --pcap file The filename of the pcap file\n");
printf(" -T --timestamp Prefix every log line with a timestamp\n");
printf(" -V --version. Print the version of OpenBSC.\n");
printf(" -P --rtp-proxy Enable the RTP Proxy code inside OpenBSC\n");
printf(" -e --log-level number. Set a global loglevel.\n");
}
static void print_version()
@@ -109,10 +112,11 @@ static void handle_options(int argc, char** argv)
{"timestamp", 0, 0, 'T'},
{"version", 0, 0, 'V' },
{"rtp-proxy", 0, 0, 'P'},
{"log-level", 1, 0, 'e'},
{0, 0, 0, 0}
};
c = getopt_long(argc, argv, "hd:sl:ar:p:TPVc:",
c = getopt_long(argc, argv, "hd:sl:ar:p:TPVc:e:",
long_options, &option_index);
if (c == -1)
break;
@@ -143,6 +147,9 @@ static void handle_options(int argc, char** argv)
case 'P':
ipacc_rtp_direct = 0;
break;
case 'e':
debug_set_log_level(stderr_target, atoi(optarg));
break;
case 'V':
print_version();
printf("\n");

View File

@@ -243,7 +243,7 @@ static void _debugp(unsigned int subsys, int level, char *file, int line,
continue;
/* Check the category log level */
if (category->loglevel != 0 && level < category->loglevel)
if (tar->loglevel == 0 && category->loglevel != 0 && level < category->loglevel)
continue;
/*