pespin submitted this change.

View Change

Approvals: osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified fixeria: Looks good to me, approved
constify msgb param in osmo_sccp_to_xua()/osmo_sua_to_sccp()

Change-Id: Ibd39b2157550d365a04872f96243d0685c17a6e3
---
M src/sccp2sua.c
M src/xua_internal.h
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/sccp2sua.c b/src/sccp2sua.c
index ffbfd2a..87d9d05 100644
--- a/src/sccp2sua.c
+++ b/src/sccp2sua.c
@@ -1427,7 +1427,7 @@
}

/*! \returns \ref xua in case of success, NULL on error (xua not freed!) */
-static struct xua_msg *sccp_to_xua_ludt(struct msgb *msg, struct xua_msg *xua)
+static struct xua_msg *sccp_to_xua_ludt(const struct msgb *msg, struct xua_msg *xua)
{
struct sccp_data_long_unitdata *ludt = (struct sccp_data_long_unitdata *)msg->l2h;

@@ -1664,7 +1664,7 @@
/*! \brief convert SCCP message to a SUA message
* \param[in] msg message buffer holding SCCP message at l2h
* \returns callee-allocated xUA message on success; NULL on error */
-struct xua_msg *osmo_sccp_to_xua(struct msgb *msg)
+struct xua_msg *osmo_sccp_to_xua(const struct msgb *msg)
{
struct xua_msg *xua;

@@ -1778,7 +1778,7 @@
/*! \brief convert parsed SUA message to SCCP message
* \param[in] xua parsed SUA message to be converted
* \returns callee-allocated msgb containing encoded SCCP message */
-struct msgb *osmo_sua_to_sccp(struct xua_msg *xua)
+struct msgb *osmo_sua_to_sccp(const struct xua_msg *xua)
{
struct msgb *msg = sccp_msgb_alloc("SCCP from SUA");
int rc;
diff --git a/src/xua_internal.h b/src/xua_internal.h
index 0061449..6cc0d72 100644
--- a/src/xua_internal.h
+++ b/src/xua_internal.h
@@ -16,8 +16,8 @@

int sua_parse_gt(struct osmo_sccp_gt *gt, const uint8_t *data, unsigned int datalen);

-struct xua_msg *osmo_sccp_to_xua(struct msgb *msg);
-struct msgb *osmo_sua_to_sccp(struct xua_msg *xua);
+struct xua_msg *osmo_sccp_to_xua(const struct msgb *msg);
+struct msgb *osmo_sua_to_sccp(const struct xua_msg *xua);

int sua_rx_msg(struct osmo_ss7_asp *asp, struct msgb *msg);


To view, visit change 41395. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: Ibd39b2157550d365a04872f96243d0685c17a6e3
Gerrit-Change-Number: 41395
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>