aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-10-12 01:29:33 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-03-09 18:34:16 +0100
commit35144b44b49cb31520f10c66fc8a9a1f4af8c3e3 (patch)
tree6c9114cee4909fb8d091fbddb774e756982f8cea /openbsc/src/gprs
parent443f8857fcf118c815a0d6aedd4ae705a09593c9 (diff)
iu: sort out confusion around asn_debug and asn1_xer_print
Before, I confused asn_debug with asn1_xer_print. Have two distinct VTY commands and fix documentation. Put the asn_debug and asn1_xer_print implementations in iu.c. Since they are globally defined, don't pass a pointer to iu_vty_init() but just use it directly. Might be considered less clean, but is also less bloat. Change-Id: Iccbadfe1585ba224f74cdfb5273b5ce29b6d78f0
Diffstat (limited to 'openbsc/src/gprs')
-rw-r--r--openbsc/src/gprs/sgsn_main.c9
-rw-r--r--openbsc/src/gprs/sgsn_vty.c4
2 files changed, 4 insertions, 9 deletions
diff --git a/openbsc/src/gprs/sgsn_main.c b/openbsc/src/gprs/sgsn_main.c
index 5cdfb31e4..d39087a26 100644
--- a/openbsc/src/gprs/sgsn_main.c
+++ b/openbsc/src/gprs/sgsn_main.c
@@ -311,12 +311,6 @@ static const struct log_info gprs_log_info = {
.num_cat = ARRAY_SIZE(gprs_categories),
};
-/* Implement the extern asn_debug from libasn1c to indicate whether the ASN.1
- * binary code decoded and encoded during Iu communication should be logged to
- * stderr. See osmocom's libasn1c, asn_internal.h, at "if (asn_debug)":
- * http://git.osmocom.org/libasn1c/tree/include/asn1c/asn_internal.h */
-int asn_debug = 0;
-
int sgsn_ranap_iu_event(struct ue_conn_ctx *ctx, enum iu_event_type type, void *data);
int main(int argc, char **argv)
@@ -344,9 +338,6 @@ int main(int argc, char **argv)
osmo_stats_vty_add_cmds(&gprs_log_info);
sgsn_vty_init();
ctrl_vty_init(tall_bsc_ctx);
-#ifdef BUILD_IU
- iu_vty_init(&asn_debug);
-#endif
handle_options(argc, argv);
diff --git a/openbsc/src/gprs/sgsn_vty.c b/openbsc/src/gprs/sgsn_vty.c
index d42a1653a..43c385db6 100644
--- a/openbsc/src/gprs/sgsn_vty.c
+++ b/openbsc/src/gprs/sgsn_vty.c
@@ -1281,6 +1281,10 @@ int sgsn_vty_init(void)
install_element(SGSN_NODE, &cfg_no_comp_v42bis_cmd);
install_element(SGSN_NODE, &cfg_comp_v42bis_cmd);
install_element(SGSN_NODE, &cfg_comp_v42bisp_cmd);
+
+#ifdef BUILD_IU
+ iu_vty_init();
+#endif
return 0;
}