mncc_recvmsg(): log caller file,line

Change-Id: I3755eb35b504f2f2580e0ba43dfa41f16087decc
neels/codecs_fmtp
Neels Hofmeyr 4 months ago
parent 2b8ae17aa2
commit 79461d1263
  1. 19
      include/osmocom/msc/transaction.h
  2. 6
      src/libmsc/gsm_04_08_cc.c

@ -17,15 +17,18 @@ struct vty;
/* Used for late TID assignment */
#define TRANS_ID_UNASSIGNED 0xff
#define LOG_TRANS_CAT_SRC(trans, subsys, file, line, level, fmt, args...) \
LOGPSRC(subsys, level, file, line, \
"trans(%s %s callref-0x%x tid-%u%s) " fmt, \
(trans) ? trans_name(trans) : "NULL", \
(trans) ? ((trans)->msc_a ? (trans)->msc_a->c.fi->id : vlr_subscr_name((trans)->vsub)) : "NULL", \
(trans) ? (trans)->callref : 0, \
(trans) ? (trans)->transaction_id : 0, \
(trans) && (trans)->paging_request ? ",PAGING" : "", \
##args)
#define LOG_TRANS_CAT(trans, subsys, level, fmt, args...) \
LOGP(subsys, level, \
"trans(%s %s callref-0x%x tid-%u%s) " fmt, \
(trans) ? trans_name(trans) : "NULL", \
(trans) ? ((trans)->msc_a ? (trans)->msc_a->c.fi->id : vlr_subscr_name((trans)->vsub)) : "NULL", \
(trans) ? (trans)->callref : 0, \
(trans) ? (trans)->transaction_id : 0, \
(trans) && (trans)->paging_request ? ",PAGING" : "", \
##args)
LOG_TRANS_CAT_SRC(trans, subsys, __FILE__, __LINE__, level, fmt, ##args)
#define LOG_TRANS(trans, level, fmt, args...) \
LOG_TRANS_CAT(trans, (trans) ? (trans)->log_subsys : DMSC, level, fmt, ##args)

@ -229,13 +229,15 @@ static void gsm48_stop_cc_timer(struct gsm_trans *trans)
}
}
static int mncc_recvmsg(struct gsm_network *net, struct gsm_trans *trans,
#define mncc_recvmsg(net, trans, msg_type, mncc) \
_mncc_recvmsg(__FILE__, __LINE__, net, trans, msg_type, mncc)
static int _mncc_recvmsg(const char *file, int line, struct gsm_network *net, struct gsm_trans *trans,
int msg_type, struct gsm_mncc *mncc)
{
struct msgb *msg;
unsigned char *data;
LOG_TRANS_CAT(trans, DMNCC, LOGL_DEBUG, "tx %s\n", get_mncc_name(msg_type));
LOG_TRANS_CAT_SRC(trans, DMNCC, file, line, LOGL_DEBUG, "tx %s\n", get_mncc_name(msg_type));
mncc->msg_type = msg_type;

Loading…
Cancel
Save