This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Review at https://gerrit.osmocom.org/7296
cosmetic: use enum ranap_nsap_addr_enc instead of int
The only reason to use int instead of the enum was the lack of header
iu_client.h when not building with Iu support. Rather use the configure result
properly, include the header when Iu support is built and use the proper enum.
Omit the entire iu sub-struct when building without Iu.
Instead of using a questionable typecast from int* to enum*, we can now use the
enum member directly without needing to silence compiler warnings.
Change-Id: Ic9f8bf53f4b605c166e84cd7edd90c10fe7d7a1f
---
M include/osmocom/msc/gsm_data.h
M src/libmsc/msc_vty.c
2 files changed, 8 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/96/7296/1
diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index 2d1d20c..a4ce7e7 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -20,6 +20,10 @@
#include "gsm_data_shared.h"
+#include "../../bscconfig.h"
+#if BUILD_IU
+#include <osmocom/ranap/iu_client.h>
+#endif
/** annotations for msgb ownership */
@@ -286,12 +290,14 @@
struct mgcp_client *client;
} mgw;
+#if BUILD_IU
struct {
/* CS7 instance id number (set via VTY) */
uint32_t cs7_instance;
- int rab_assign_addr_enc;
+ enum ranap_nsap_addr_enc rab_assign_addr_enc;
struct osmo_sccp_instance *sccp;
} iu;
+#endif
struct {
/* CS7 instance id number (set via VTY) */
diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c
index 503ae68..649e431 100644
--- a/src/libmsc/msc_vty.c
+++ b/src/libmsc/msc_vty.c
@@ -239,7 +239,7 @@
mgcp_client_vty_init(msc_network, MSC_NODE, &msc_network->mgw.conf);
#ifdef BUILD_IU
- ranap_iu_vty_init(MSC_NODE, (enum ranap_nsap_addr_enc*)&msc_network->iu.rab_assign_addr_enc);
+ ranap_iu_vty_init(MSC_NODE, &msc_network->iu.rab_assign_addr_enc);
#endif
osmo_fsm_vty_add_cmds();
}
--
To view, visit https://gerrit.osmocom.org/7296
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic9f8bf53f4b605c166e84cd7edd90c10fe7d7a1f
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>