aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmsc/mncc_sock.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2019-05-09 01:23:09 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2019-05-09 01:23:09 +0200
commit5255874529acef74da69721a45ef3ecb75b07454 (patch)
tree665ac001e049187d8c3e48eafdec37f4616b3a0d /src/libmsc/mncc_sock.c
parente39f6cd7528895d9dd67a4d4ebddda764422776f (diff)
fix regression: fix internal MNCC operation
While developing the inter-MSC handover refactoring, I was annoyed by the fact that mncc_tx_to_cc() receives an MNCC message struct containing a msg_type, as well as a separate msg_type argument, which may deviate from each other. So, as a first step I wanted to make sure that all callers send identical values for both by inserting an OSMO_ASSERT(msg_type == msg->msg_type). Later I was going to remove the separate msg_type argument. I then forgot to - carry on to remove the argument and - to actually test with internal MNCC (it so happens that all of our ttcn3 tests also use external MNCC). As a result, the "large refactoring" patch for inter-MSC Handover breaks internal MNCC operation. Fix that: remove the separate msg_type argument and make sure that all callers of mncc_tx_to_cc() indeed pass the desired msg_type in msg->msg_type, and hence also remove the odd duality of arguments. Various functions in mncc_builtin.c also exhibit this separate msg_type argument, which are all unused and make absolutely no sense. Remove those as well. Related: OS#3989 Change-Id: I966ce764796982709ea3312e76988a95257acb8d
Diffstat (limited to 'src/libmsc/mncc_sock.c')
-rw-r--r--src/libmsc/mncc_sock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libmsc/mncc_sock.c b/src/libmsc/mncc_sock.c
index b2739e857..0a4e99b92 100644
--- a/src/libmsc/mncc_sock.c
+++ b/src/libmsc/mncc_sock.c
@@ -118,7 +118,7 @@ static int mncc_sock_read(struct osmo_fd *bfd)
rc = mncc_prim_check(mncc_prim, rc);
if (rc == 0)
- rc = mncc_tx_to_cc(state->net, mncc_prim->msg_type, mncc_prim);
+ rc = mncc_tx_to_cc(state->net, mncc_prim);
/* as we always synchronously process the message in mncc_send() and
* its callbacks, we can free the message here. */