aboutsummaryrefslogtreecommitdiffstats
path: root/src/gb/gprs_ns2_fr.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2020-11-29 17:39:19 +0100
committerlaforge <laforge@osmocom.org>2021-01-18 14:07:48 +0000
commit603f404e41a95e20d39ee64b649c8c19777caa8f (patch)
tree506a2c2e54b52060a232074d87bfd7edc04c8db3 /src/gb/gprs_ns2_fr.c
parent509047ba5d2daf2cecfa198d0dca1430c8257294 (diff)
gprs_ns2: Give NS-VC FSMs a proper name/identifier
Log output without a proper identifier is mostly useless. Change-Id: Id9d5b0684584d03685900c6298fe70246793de14 Closes: OS#4876
Diffstat (limited to 'src/gb/gprs_ns2_fr.c')
-rw-r--r--src/gb/gprs_ns2_fr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gb/gprs_ns2_fr.c b/src/gb/gprs_ns2_fr.c
index bb553812..c1bed6c6 100644
--- a/src/gb/gprs_ns2_fr.c
+++ b/src/gb/gprs_ns2_fr.c
@@ -737,13 +737,17 @@ struct gprs_ns2_vc *gprs_ns2_fr_connect(struct gprs_ns2_vc_bind *bind,
{
struct gprs_ns2_vc *nsvc = NULL;
struct priv_vc *priv = NULL;
+ struct priv_bind *bpriv = bind->priv;
+ char idbuf[64];
nsvc = gprs_ns2_fr_nsvc_by_dlci(bind, dlci);
if (nsvc) {
goto err;
}
- nsvc = ns2_vc_alloc(bind, nse, true, NS2_VC_MODE_BLOCKRESET);
+ snprintf(idbuf, sizeof(idbuf), "%s-%s-DLCI%u-NSE%05u-NSVC%05u", gprs_ns2_lltype_str(nse->ll),
+ bpriv->netif, dlci, nse->nsei, nsvci);
+ nsvc = ns2_vc_alloc(bind, nse, true, NS2_VC_MODE_BLOCKRESET, idbuf);
if (!nsvc)
goto err;