diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-07-06 17:23:54 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-07-06 17:23:54 +0200 |
commit | a9a35419ed56fd0824d122155e0559bb872f0567 (patch) | |
tree | ec8af345f2547a09deb9dc30bd2b9ff9f7e69a84 /src | |
parent | 91e7bd7d30285681e268fb6d28d310339eae2491 (diff) |
rsl: Use value_string to print encryption algo name
Change-Id: I8303364270e73718e57f8efc2f375817b9496ffc
Diffstat (limited to 'src')
-rw-r--r-- | src/common/rsl.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/common/rsl.c b/src/common/rsl.c index 8bbf73c1..92952408 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -865,12 +865,13 @@ static int encr_info2lchan(struct gsm_lchan *lchan, { int rc; struct gsm_bts *bts = lchan->ts->trx->bts; + const char *ciph_name = get_value_string(gsm0808_chosen_enc_alg_names, *val); /* check if the encryption algorithm sent by BSC is supported! */ rc = bts_supports_cipher(bts, *val); if (rc != 1) { - LOGP(DRSL, LOGL_ERROR, "%s: BTS doesn't support cipher 0x%02x\n", - gsm_lchan_name(lchan), *val); + LOGP(DRSL, LOGL_ERROR, "%s: BTS doesn't support cipher %s\n", + gsm_lchan_name(lchan), ciph_name); return -EINVAL; } @@ -886,8 +887,8 @@ static int encr_info2lchan(struct gsm_lchan *lchan, if (lchan->encr.key_len > sizeof(lchan->encr.key)) lchan->encr.key_len = sizeof(lchan->encr.key); memcpy(lchan->encr.key, val, lchan->encr.key_len); - DEBUGP(DRSL, "%s: Setting lchan cipher algorithm 0x%02x\n", - gsm_lchan_name(lchan), lchan->encr.alg_id); + DEBUGP(DRSL, "%s: Setting lchan cipher algorithm %s\n", + gsm_lchan_name(lchan), ciph_name); return 0; } |