diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2017-11-22 14:33:12 +0100 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2017-11-27 15:40:01 +0100 |
commit | 6166f29412ef1dc3395dcee914ec98bd013663b4 (patch) | |
tree | ccbb38f1d76ae3126dd4ef967a4103b827f18f13 /src/libmsc/gsm_04_08.c | |
parent | 2f108b09a953ee1285a8ebff948a3ad7bfa77780 (diff) |
subscr_conn: introduce usage tokens for ref error tracking
When hunting a conn use count bug, it was very hard to figure out who's (not)
using the conn. To ease tracking down this bug and future bugs, explicitly name
what a conn is being reserved for, and track in a bit mask.
Show in the DREF logs what uses and un-uses a conn. See the test expectation
updates, which nicely show how that clarifies the state of the conn in the
logs.
On errors, log them, but don't fail hard: if one conn use/un-use fails, we
don't want to crash the entire MSC before we have to.
Change-Id: I259aa0eec41efebb4c8221275219433eafaa549b
Diffstat (limited to 'src/libmsc/gsm_04_08.c')
-rw-r--r-- | src/libmsc/gsm_04_08.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 5fab4090c..e783b5e63 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -2981,7 +2981,7 @@ int mncc_tx_to_cc(struct gsm_network *net, int msg_type, void *arg) } /* Assign conn */ - trans->conn = msc_subscr_conn_get(conn); + trans->conn = msc_subscr_conn_get(conn, MSC_CONN_USE_TRANS_CC); vlr_subscr_put(vsub); } else { /* update the subscriber we deal with */ @@ -3133,7 +3133,7 @@ static int gsm0408_rcv_cc(struct gsm_subscriber_connection *conn, struct msgb *m return -ENOMEM; } /* Assign transaction */ - trans->conn = msc_subscr_conn_get(conn); + trans->conn = msc_subscr_conn_get(conn, MSC_CONN_USE_TRANS_CC); cm_service_request_concludes(conn, msg); } |