diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2019-10-07 21:20:43 +0200 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2019-10-21 00:40:31 +0200 |
commit | f636e6cedd3d1ef0c53daa3320a487751a9cdc35 (patch) | |
tree | e7c8011202ce30035de8c6450f878cfe11213417 /src/libmsc | |
parent | a09f4987c1e636052a4e37dae9d183d5aea49a8f (diff) |
LOG_TRANS for CC: always log CC state
For all CC type transaction logging, log the current trans->cc.state string for
all LOG_TRANS*() logging.
Change-Id: I67be12c74c679ce684f8c0b9b4e0d96299849dc6
Diffstat (limited to 'src/libmsc')
-rw-r--r-- | src/libmsc/transaction.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/libmsc/transaction.c b/src/libmsc/transaction.c index 11cde934b..94712cc89 100644 --- a/src/libmsc/transaction.c +++ b/src/libmsc/transaction.c @@ -303,3 +303,19 @@ uint8_t trans_type_to_gsm48_proto(enum trans_type type) } } + +const char *trans_name(const struct gsm_trans *trans) +{ + static char namebuf[32]; + if (!trans) + return "NULL"; + switch (trans->type) { + case TRANS_CC: + snprintf(namebuf, sizeof(namebuf), "%s:%s", + trans_type_name(trans->type), gsm48_cc_state_name(trans->cc.state)); + return namebuf; + + default: + return trans_type_name(trans->type); + } +} |