aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmsc/transaction.c
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-05-11 02:17:16 +0700
committerHarald Welte <laforge@gnumonks.org>2019-05-26 09:27:22 +0000
commitb683dcfe6bda723413b19c3bf5789d1a3bc3f7c7 (patch)
tree1639f6ec722cf2f9e9054837b03715792fc001c6 /src/libmsc/transaction.c
parenta3cdab448121c76a56ef547ffdc61e3f58a93dbc (diff)
transaction: accept trans_type enum in trans_log_subsys()
Diffstat (limited to 'src/libmsc/transaction.c')
-rw-r--r--src/libmsc/transaction.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libmsc/transaction.c b/src/libmsc/transaction.c
index d6f8c3b17..ebdaced5d 100644
--- a/src/libmsc/transaction.c
+++ b/src/libmsc/transaction.c
@@ -127,11 +127,12 @@ struct gsm_trans *trans_alloc(struct gsm_network *net,
enum trans_type type, uint8_t trans_id,
uint32_t callref)
{
- struct gsm_trans *trans = NULL; /* (NULL for LOG_TRANS() before allocation) */
+ int subsys = trans_log_subsys(type);
+ struct gsm_trans *trans;
/* a valid subscriber is indispensable */
if (vsub == NULL) {
- LOG_TRANS(trans, LOGL_ERROR, "unable to alloc transaction, invalid subscriber (NULL)\n");
+ LOGP(subsys, LOGL_ERROR, "unable to alloc transaction, invalid subscriber (NULL)\n");
return NULL;
}
@@ -142,11 +143,11 @@ struct gsm_trans *trans_alloc(struct gsm_network *net,
*trans = (struct gsm_trans){
.vsub = vsub,
.type = type,
+ .log_subsys = subsys,
.transaction_id = trans_id,
.callref = callref,
.net = net,
};
- trans->log_subsys = trans_log_subsys(trans);
vlr_subscr_get(vsub, trans_vsub_use(type));
llist_add_tail(&trans->entry, &net->trans_list);