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/.
Vadim Yanitskiy gerrit-no-reply at lists.osmocom.orgVadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/12686
Change subject: transaction: change arguments of trans_find_by_sm_rp_mr()
......................................................................
transaction: change arguments of trans_find_by_sm_rp_mr()
The need to pass a pointer to RAN connection in order to find
a transaction limits possible use cases of trans_find_by_sm_rp_mr(),
e.g. when we need to find a transaction, but RAN connection is not
established yet.
Moreover, the pointer to RAN connection was only used to obtain
pointers to gsm_network and vlr_subscr, so we can just
pass them directly.
Change-Id: I093f36d63e671e50e54fc6236e97a777cc6da77b
---
M include/osmocom/msc/transaction.h
M src/libmsc/gsm_04_11_gsup.c
M src/libmsc/transaction.c
3 files changed, 7 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/86/12686/1
diff --git a/include/osmocom/msc/transaction.h b/include/osmocom/msc/transaction.h
index 6e67f39..36e9bc1 100644
--- a/include/osmocom/msc/transaction.h
+++ b/include/osmocom/msc/transaction.h
@@ -100,7 +100,8 @@
uint8_t proto, uint8_t trans_id);
struct gsm_trans *trans_find_by_callref(const struct gsm_network *net,
uint32_t callref);
-struct gsm_trans *trans_find_by_sm_rp_mr(const struct ran_conn *conn,
+struct gsm_trans *trans_find_by_sm_rp_mr(const struct gsm_network *net,
+ const struct vlr_subscr *vsub,
uint8_t sm_rp_mr);
struct gsm_trans *trans_alloc(struct gsm_network *net,
diff --git a/src/libmsc/gsm_04_11_gsup.c b/src/libmsc/gsm_04_11_gsup.c
index f2de95f..8b1225e 100644
--- a/src/libmsc/gsm_04_11_gsup.c
+++ b/src/libmsc/gsm_04_11_gsup.c
@@ -176,7 +176,7 @@
}
/* Attempt to find DTAP-transaction */
- trans = trans_find_by_sm_rp_mr(conn, *(gsup_msg->sm_rp_mr));
+ trans = trans_find_by_sm_rp_mr(net, vsub, *(gsup_msg->sm_rp_mr));
if (!trans) {
LOGP(DLSMS, LOGL_NOTICE, "No transaction found for %s, "
"ignoring %s-%s message...\n", vlr_subscr_name(vsub),
diff --git a/src/libmsc/transaction.c b/src/libmsc/transaction.c
index df770ed..df85d9a 100644
--- a/src/libmsc/transaction.c
+++ b/src/libmsc/transaction.c
@@ -72,15 +72,15 @@
}
/*! Find a transaction by SM-RP-MR (RP Message Reference)
- * \param[in] conn Connection in which we want to find transaction
+ * \param[in] net Network in which we should search
+ * \param[in] vsub Subscriber for which we should search
* \param[in] sm_rp_mr RP Message Reference (see GSM TS 04.11, section 8.2.3)
* \returns Matching transaction, NULL otherwise
*/
-struct gsm_trans *trans_find_by_sm_rp_mr(const struct ran_conn *conn,
+struct gsm_trans *trans_find_by_sm_rp_mr(const struct gsm_network *net,
+ const struct vlr_subscr *vsub,
uint8_t sm_rp_mr)
{
- struct gsm_network *net = conn->network;
- struct vlr_subscr *vsub = conn->vsub;
struct gsm_trans *trans;
llist_for_each_entry(trans, &net->trans_list, entry) {
--
To view, visit https://gerrit.osmocom.org/12686
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: I093f36d63e671e50e54fc6236e97a777cc6da77b
Gerrit-Change-Number: 12686
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190123/64309e49/attachment.htm>