Change in osmo-msc[master]: a_iface: use 'const' qualifier for ran_conn whenever possible

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Mon Feb 18 12:08:14 UTC 2019


Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/12926


Change subject: a_iface: use 'const' qualifier for ran_conn whenever possible
......................................................................

a_iface: use 'const' qualifier for ran_conn whenever possible

Change-Id: I8a15c9baae2071569e2ecc4635ddaf5a0001f959
---
M include/osmocom/msc/a_iface.h
M src/libmsc/a_iface.c
2 files changed, 4 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/26/12926/1

diff --git a/include/osmocom/msc/a_iface.h b/include/osmocom/msc/a_iface.h
index 2d11cca..d8a8aab 100644
--- a/include/osmocom/msc/a_iface.h
+++ b/include/osmocom/msc/a_iface.h
@@ -68,7 +68,7 @@
 int a_iface_tx_assignment(const struct gsm_trans *trans);
 
 /* Send clear command via A-interface */
-int a_iface_tx_clear_cmd(struct ran_conn *conn);
+int a_iface_tx_clear_cmd(const struct ran_conn *conn);
 
 int a_iface_tx_classmark_request(const struct ran_conn *conn);
 
diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c
index c76e5c5..2c38189 100644
--- a/src/libmsc/a_iface.c
+++ b/src/libmsc/a_iface.c
@@ -154,14 +154,13 @@
 /* Send DTAP message via A-interface, take ownership of msg */
 int a_iface_tx_dtap(struct msgb *msg)
 {
-	struct ran_conn *conn;
+	const struct ran_conn *conn;
 	struct msgb *msg_resp;
 
 	uint8_t link_id = OMSC_LINKID_CB(msg);
 	OSMO_ASSERT(msg);
 	conn = (struct ran_conn *)msg->dst;
 	OSMO_ASSERT(conn);
-	OSMO_ASSERT(conn->a.scu);
 
 	LOGPCONN(conn, LOGL_DEBUG, "Passing DTAP message (DLCI=0x%02x) from MSC to BSC\n", link_id);
 
@@ -367,7 +366,7 @@
 /* Send assignment request via A-interface */
 int a_iface_tx_assignment(const struct gsm_trans *trans)
 {
-	struct ran_conn *conn;
+	const struct ran_conn *conn;
 	struct gsm0808_channel_type ct;
 	struct gsm0808_speech_codec_list scl;
 	struct msgb *msg;
@@ -418,7 +417,7 @@
 }
 
 /* Send clear command via A-interface */
-int a_iface_tx_clear_cmd(struct ran_conn *conn)
+int a_iface_tx_clear_cmd(const struct ran_conn *conn)
 {
 	struct msgb *msg;
 	struct vlr_subscr *vsub = conn->vsub;

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8a15c9baae2071569e2ecc4635ddaf5a0001f959
Gerrit-Change-Number: 12926
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190218/be414dd1/attachment.htm>


More information about the gerrit-log mailing list