aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmsc/silent_call.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2017-11-22 14:33:12 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2017-11-27 15:40:01 +0100
commit6166f29412ef1dc3395dcee914ec98bd013663b4 (patch)
treeccbb38f1d76ae3126dd4ef967a4103b827f18f13 /src/libmsc/silent_call.c
parent2f108b09a953ee1285a8ebff948a3ad7bfa77780 (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/silent_call.c')
-rw-r--r--src/libmsc/silent_call.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libmsc/silent_call.c b/src/libmsc/silent_call.c
index 5b197008b..b9a8ed90b 100644
--- a/src/libmsc/silent_call.c
+++ b/src/libmsc/silent_call.c
@@ -59,7 +59,7 @@ static int paging_cb_silent(unsigned int hooknum, unsigned int event,
conn->lchan->ts->nr, conn->lchan->ts->trx->arfcn);
#endif
conn->silent_call = 1;
- msc_subscr_conn_get(conn);
+ msc_subscr_conn_get(conn, MSC_CONN_USE_SILENT_CALL);
/* increment lchan reference count */
osmo_signal_dispatch(SS_SCALL, S_SCALL_SUCCESS, &sigdata);
break;
@@ -159,7 +159,7 @@ int gsm_silent_call_stop(struct vlr_subscr *vsub)
#endif
conn->silent_call = 0;
- msc_subscr_conn_put(conn);
+ msc_subscr_conn_put(conn, MSC_CONN_USE_SILENT_CALL);
return 0;
}