diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2023-06-05 14:25:59 +0200 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2023-07-09 07:41:33 +0000 |
commit | 5b1ab541a2078df8f6b9bb4df59c7c49007af963 (patch) | |
tree | c86d79d7f1d9a184c0d254326282cdbc178100ba | |
parent | 456c6f7e4d0814e7fffad9f97a37b6138248a773 (diff) |
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
-rw-r--r-- | src/libmsc/transaction.c | 7 |
1 files changed, 4 insertions, 3 deletions
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"); |