lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-iuh/+/40844?usp=email )


Change subject: move general asn debug options into iu_helpers
......................................................................

move general asn debug options into iu_helpers

In prepration to remove iu_client. Move debug
variables asn_debug and asn1_xer_print which are not related
to iu_client into common part.

Related: OS#5487
Change-Id: If5175c449af13fe81e89488df71fcd8192091659
---
M include/osmocom/iuh/iu_common.h
M include/osmocom/ranap/iu_client.h
M src/iu_client.c
M src/iu_helpers.c
4 files changed, 13 insertions(+), 13 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/44/40844/1

diff --git a/include/osmocom/iuh/iu_common.h b/include/osmocom/iuh/iu_common.h
index 11c2a79..766b622 100644
--- a/include/osmocom/iuh/iu_common.h
+++ b/include/osmocom/iuh/iu_common.h
@@ -21,3 +21,6 @@
        uint8_t payload[0];     /* possible further length field + payload */
 } __attribute__ ((packed));

+/* Debugging switches from asn1c and osmo-iuh */
+extern int asn_debug;
+extern int asn1_xer_print;
diff --git a/include/osmocom/ranap/iu_client.h 
b/include/osmocom/ranap/iu_client.h
index 465a17d..a595a97 100644
--- a/include/osmocom/ranap/iu_client.h
+++ b/include/osmocom/ranap/iu_client.h
@@ -5,6 +5,7 @@
 #include <osmocom/core/defs.h>
 #include <osmocom/core/linuxlist.h>
 #include <osmocom/gsm/gsm48.h>
+#include <osmocom/iuh/iu_common.h>
 #include <osmocom/sigtran/sccp_sap.h>

 struct msgb;
@@ -15,10 +16,6 @@

 struct ranap_iu_rnc;

-/* Debugging switches from asn1c and osmo-iuh */
-extern int asn_debug;
-extern int asn1_xer_print;
-
 enum ranap_nsap_addr_enc {
        RANAP_NSAP_ADDR_ENC_X213,
        RANAP_NSAP_ADDR_ENC_V4RAW,
diff --git a/src/iu_client.c b/src/iu_client.c
index 62ba58f..b54a0b8 100644
--- a/src/iu_client.c
+++ b/src/iu_client.c
@@ -80,15 +80,6 @@

 void *talloc_iu_ctx;

-/* Implement the extern asn_debug from libasn1c to indicate whether to print
- * asn.1 debug messages (see libasn1c). */
-int asn_debug = 0;
-
-/* Implement the extern asn1_xer_print to indicate whether the ASN.1 binary
- * code decoded and encoded during Iu communication should be logged to stderr
- * (see asn.1 generated code in osmo-iuh). */
-int asn1_xer_print = 0;
-
 ranap_iu_recv_cb_t global_iu_recv_cb = NULL;
 ranap_iu_event_cb_t global_iu_event_cb = NULL;
 int iu_log_subsystem = 0;
diff --git a/src/iu_helpers.c b/src/iu_helpers.c
index 5c7ff31..a89114a 100644
--- a/src/iu_helpers.c
+++ b/src/iu_helpers.c
@@ -31,6 +31,15 @@
 #include <osmocom/ranap/RANAP_TransportLayerAddress.h>
 #include <osmocom/ranap/RANAP_TransportLayerInformation.h>

+/* Implement the extern asn_debug from libasn1c to indicate whether to print
+ * asn.1 debug messages (see libasn1c). */
+int asn_debug = 0;
+
+/* Implement the extern asn1_xer_print to indicate whether the ASN.1 binary
+ * code decoded and encoded during Iu communication should be logged to stderr
+ * (see asn.1 generated code in osmo-iuh). */
+int asn1_xer_print = 0;
+
 /* decode a BCD-string as used inside ASN.1 encoded Iu interface protocols */
 int ranap_bcd_decode(char *out, size_t out_len, const uint8_t *in, size_t 
in_len)
 {

--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/40844?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: If5175c449af13fe81e89488df71fcd8192091659
Gerrit-Change-Number: 40844
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <[email protected]>

Reply via email to