aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2013-03-03 18:27:55 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-01-20 11:41:59 +0100
commitf2e95c9d58e207a4c68e90b52c636c98ea55a32d (patch)
treec0f70fb57c471535551f216260ef0abe4bc64663
parent3688abb0b24bf5065f5f8fdf3bac6442cb87812a (diff)
Revert "libgb/gprs: don't use log_info from libcommon anymore"
This reverts commit 11461a64574314fbc4747fe6251ca000fdd56b75. This is causing crashes as soon as the VTY is used. Debugged by Katerina and spotted by the customer and during VTY testing. Conflicts: openbsc/include/osmocom/gprs/gprs_msgb.h openbsc/src/gprs/sgsn_main.c openbsc/src/libgb/common_vty.c
-rw-r--r--openbsc/src/gprs/gb_proxy_main.c29
-rw-r--r--openbsc/src/gprs/sgsn_main.c62
2 files changed, 4 insertions, 87 deletions
diff --git a/openbsc/src/gprs/gb_proxy_main.c b/openbsc/src/gprs/gb_proxy_main.c
index 15e72f8db..4429eefe8 100644
--- a/openbsc/src/gprs/gb_proxy_main.c
+++ b/openbsc/src/gprs/gb_proxy_main.c
@@ -198,31 +198,6 @@ static struct vty_app_info vty_info = {
.is_config_node = bsc_vty_is_config_node,
};
-/* default categories */
-static struct log_info_cat gprs_categories[] = {
- [DGPRS] = {
- .name = "DGPRS",
- .description = "GPRS Packet Service",
- .enabled = 1, .loglevel = LOGL_DEBUG,
- },
- [DNS] = {
- .name = "DNS",
- .description = "GPRS Network Service (NS)",
- .enabled = 1, .loglevel = LOGL_INFO,
- },
- [DBSSGP] = {
- .name = "DBSSGP",
- .description = "GPRS BSS Gateway Protocol (BSSGP)",
- .enabled = 1, .loglevel = LOGL_DEBUG,
- },
-};
-
-static const struct log_info gprs_log_info = {
- .filter_fn = gprs_log_filter_fn,
- .cat = gprs_categories,
- .num_cat = ARRAY_SIZE(gprs_categories),
-};
-
int main(int argc, char **argv)
{
struct gsm_network dummy_network;
@@ -237,11 +212,11 @@ int main(int argc, char **argv)
signal(SIGUSR2, &signal_handler);
osmo_init_ignore_signals();
- osmo_init_logging(&gprs_log_info);
+ osmo_init_logging(&log_info);
vty_info.copyright = openbsc_copyright;
vty_init(&vty_info);
- logging_vty_add_cmds(&gprs_log_info);
+ logging_vty_add_cmds(&log_info);
gbproxy_vty_init();
handle_options(argc, argv);
diff --git a/openbsc/src/gprs/sgsn_main.c b/openbsc/src/gprs/sgsn_main.c
index 0db90d5c3..5e9fee7f5 100644
--- a/openbsc/src/gprs/sgsn_main.c
+++ b/openbsc/src/gprs/sgsn_main.c
@@ -228,64 +228,6 @@ static void handle_options(int argc, char **argv)
}
}
-/* default categories */
-static struct log_info_cat gprs_categories[] = {
- [DMM] = {
- .name = "DMM",
- .description = "Layer3 Mobility Management (MM)",
- .color = "\033[1;33m",
- .enabled = 1, .loglevel = LOGL_NOTICE,
- },
- [DPAG] = {
- .name = "DPAG",
- .description = "Paging Subsystem",
- .color = "\033[1;38m",
- .enabled = 1, .loglevel = LOGL_NOTICE,
- },
- [DMEAS] = {
- .name = "DMEAS",
- .description = "Radio Measurement Processing",
- .enabled = 0, .loglevel = LOGL_NOTICE,
- },
- [DREF] = {
- .name = "DREF",
- .description = "Reference Counting",
- .enabled = 0, .loglevel = LOGL_NOTICE,
- },
- [DGPRS] = {
- .name = "DGPRS",
- .description = "GPRS Packet Service",
- .enabled = 1, .loglevel = LOGL_DEBUG,
- },
- [DNS] = {
- .name = "DNS",
- .description = "GPRS Network Service (NS)",
- .enabled = 1, .loglevel = LOGL_INFO,
- },
- [DBSSGP] = {
- .name = "DBSSGP",
- .description = "GPRS BSS Gateway Protocol (BSSGP)",
- .enabled = 1, .loglevel = LOGL_DEBUG,
- },
- [DLLC] = {
- .name = "DLLC",
- .description = "GPRS Logical Link Control Protocol (LLC)",
- .enabled = 1, .loglevel = LOGL_DEBUG,
- },
- [DSNDCP] = {
- .name = "DSNDCP",
- .description = "GPRS Sub-Network Dependent Control Protocol (SNDCP)",
- .enabled = 1, .loglevel = LOGL_DEBUG,
- },
-};
-
-static const struct log_info gprs_log_info = {
- .filter_fn = gprs_log_filter_fn,
- .cat = gprs_categories,
- .num_cat = ARRAY_SIZE(gprs_categories),
-};
-
-
int main(int argc, char **argv)
{
struct ctrl_handle *ctrl;
@@ -301,11 +243,11 @@ int main(int argc, char **argv)
signal(SIGUSR2, &signal_handler);
osmo_init_ignore_signals();
- osmo_init_logging(&gprs_log_info);
+ osmo_init_logging(&log_info);
vty_info.copyright = openbsc_copyright;
vty_init(&vty_info);
- logging_vty_add_cmds(&gprs_log_info);
+ logging_vty_add_cmds(&log_info);
sgsn_vty_init();
handle_options(argc, argv);