diff options
author | Sylvain Munaut <tnt@246tNt.com> | 2019-05-10 11:56:02 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2019-05-14 09:18:10 +0000 |
commit | 762bb042ec4aeea41029208ef2d25e3919a23ae2 (patch) | |
tree | 045b8d5e1084840a8e48d3480de773a1745ddae3 /include | |
parent | ffd522ec6fcd878c8be8c06d44efb7bcb9084791 (diff) |
make LOG_TRANS() NULL-safe again
Previous patch [1] removed NULL-safety from LOG_TRANS(). Fix that.
In case a trans is NULL, it is fine to log in the DMSC category, since the
context should still be general (erratic message or other initial problems).
[1] 7f85acea9bb9f80e208820958f4cae63625f3689 / I6dfe5b98fb9e884c2dde61d603832dafceb12123
"LOG_TRANS: store subsys in trans, unify USSD logging back to DMM"
Change-Id: I6e36c47bf828dd073b36c6301bbeabcc28e101e6
Diffstat (limited to 'include')
-rw-r--r-- | include/osmocom/msc/transaction.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/osmocom/msc/transaction.h b/include/osmocom/msc/transaction.h index c63ef5bc7..9278b6400 100644 --- a/include/osmocom/msc/transaction.h +++ b/include/osmocom/msc/transaction.h @@ -27,7 +27,7 @@ struct vty; ##args) #define LOG_TRANS(trans, level, fmt, args...) \ - LOG_TRANS_CAT(trans, (trans)->log_subsys, level, fmt, ##args) + LOG_TRANS_CAT(trans, (trans) ? (trans)->log_subsys : DMSC, level, fmt, ##args) enum bridge_state { BRIDGE_STATE_NONE, |