From 5b1ab541a2078df8f6b9bb4df59c7c49007af963 Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Mon, 5 Jun 2023 14:25:59 +0200 Subject: ASCI: Allow transaction without subscriber associated Generally a transaction is linked with a subscriber (vsub). A voice group call transaction may not have a subscriber associated. The vsub field of the transaction will be NULL. If the group call is initiated by a calling subscriber, the vsub field is set until the calling subscriber is assigned to the voice group channel. If the group call is initiated via VTY, vsub field is not set on creation of the transaction. Change-Id: I2b9afe95db4c106c141f4b7bd199ec74e197e523 Related: OS#4854 --- src/libmsc/transaction.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/libmsc/transaction.c b/src/libmsc/transaction.c index 9fc468227..a3a9ef1b8 100644 --- a/src/libmsc/transaction.c +++ b/src/libmsc/transaction.c @@ -199,8 +199,8 @@ struct gsm_trans *trans_alloc(struct gsm_network *net, int subsys = trans_log_subsys(type); struct gsm_trans *trans; - /* a valid subscriber is indispensable */ - if (vsub == NULL) { + /* A valid subscriber is indispensable, except for voice group/broadcast calls. */ + if (vsub == NULL && type != TRANS_GCC && type != TRANS_BCC) { LOGP(subsys, LOGL_ERROR, "unable to alloc transaction, invalid subscriber (NULL)\n"); return NULL; } @@ -222,7 +222,8 @@ struct gsm_trans *trans_alloc(struct gsm_network *net, .speech_ver = { -1 }, }, }; - vlr_subscr_get(vsub, trans_vsub_use(type)); + if (vsub) + vlr_subscr_get(vsub, trans_vsub_use(type)); llist_add_tail(&trans->entry, &net->trans_list); LOG_TRANS(trans, LOGL_DEBUG, "New transaction\n"); -- cgit v1.2.3