fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmocom-bb/+/30744 )


Change subject: trxcon: call trxcon_set_log_cfg() from trxcon_main.c
......................................................................

trxcon: call trxcon_set_log_cfg() from trxcon_main.c

Change-Id: I5692dbd65c62ff235f687ea0b72c42867f50141e
Related: OS#5500
---
M src/host/trxcon/src/logging.c
M src/host/trxcon/src/trxcon_main.c
2 files changed, 10 insertions(+), 12 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/44/30744/1

diff --git a/src/host/trxcon/src/logging.c b/src/host/trxcon/src/logging.c
index 763a78d..e98d79a 100644
--- a/src/host/trxcon/src/logging.c
+++ b/src/host/trxcon/src/logging.c
@@ -21,7 +21,6 @@
 #include <osmocom/core/logging.h>
 #include <osmocom/core/utils.h>

-#include <osmocom/bb/trxcon/trxcon.h>
 #include <osmocom/bb/trxcon/logging.h>

 static struct log_info_cat trxcon_log_info_cat[] = {
@@ -80,15 +79,6 @@
        .num_cat = ARRAY_SIZE(trxcon_log_info_cat),
 };

-static const int trxcon_log_cfg[] = {
-       [TRXCON_LOGC_FSM] = DAPP,
-       [TRXCON_LOGC_L1C] = DL1C,
-       [TRXCON_LOGC_L1D] = DL1D,
-       [TRXCON_LOGC_SCHC] = DSCH,
-       [TRXCON_LOGC_SCHD] = DSCHD,
-       [TRXCON_LOGC_GRR] = DGRR,
-};
-
 int trxcon_logging_init(void *tall_ctx, const char *category_mask)
 {
        osmo_init_logging2(tall_ctx, &trxcon_log_info);
@@ -96,7 +86,5 @@
        if (category_mask)
                log_parse_category_mask(osmo_stderr_target, category_mask);

-       trxcon_set_log_cfg(&trxcon_log_cfg[0], ARRAY_SIZE(trxcon_log_cfg));
-
        return 0;
 }
diff --git a/src/host/trxcon/src/trxcon_main.c 
b/src/host/trxcon/src/trxcon_main.c
index 95e5549..08973f9 100644
--- a/src/host/trxcon/src/trxcon_main.c
+++ b/src/host/trxcon/src/trxcon_main.c
@@ -279,6 +279,15 @@
        }
 }

+static const int trxcon_log_cfg[] = {
+       [TRXCON_LOGC_FSM] = DAPP,
+       [TRXCON_LOGC_L1C] = DL1C,
+       [TRXCON_LOGC_L1D] = DL1D,
+       [TRXCON_LOGC_SCHC] = DSCH,
+       [TRXCON_LOGC_SCHD] = DSCHD,
+       [TRXCON_LOGC_GRR] = DGRR,
+};
+
 int main(int argc, char **argv)
 {
        struct l1ctl_server_cfg server_cfg;
@@ -305,6 +314,7 @@

        /* Init logging system */
        trxcon_logging_init(tall_trxcon_ctx, app_data.debug_mask);
+       trxcon_set_log_cfg(&trxcon_log_cfg[0], ARRAY_SIZE(trxcon_log_cfg));

        /* Configure pretty logging */
        log_set_print_extended_timestamp(osmo_stderr_target, 1);

--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30744
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I5692dbd65c62ff235f687ea0b72c42867f50141e
Gerrit-Change-Number: 30744
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <[email protected]>
Gerrit-MessageType: newchange

Reply via email to