aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-06-15 23:52:23 +0200
committerHarald Welte <laforge@gnumonks.org>2019-06-16 11:34:15 +0200
commit3ca26c71a695276880dd187a02e118e742fa77b2 (patch)
treee0e9fb62a6d4c229bf8b65e9ca710ef917b77d83
parent024bbdea20bef639feb431462ca0bc4294a69f69 (diff)
cbsp: Use osmo_cbsp_errstrlaforge/cbsp
-rw-r--r--src/osmo-bsc/cbsp_link.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/osmo-bsc/cbsp_link.c b/src/osmo-bsc/cbsp_link.c
index f6f73fd..b59edf2 100644
--- a/src/osmo-bsc/cbsp_link.c
+++ b/src/osmo-bsc/cbsp_link.c
@@ -82,7 +82,8 @@ static int cbsp_srv_cb(struct osmo_stream_srv *conn)
cbsp_rx_decoded(cbc, decoded);
talloc_free(decoded);
} else {
- LOGP(DCBS, LOGL_ERROR, "Unable to decode CBSP %s\n", msgb_hexdump(msg));
+ LOGP(DCBS, LOGL_ERROR, "Unable to decode CBSP %s: '%s'\n",
+ msgb_hexdump(msg), osmo_cbsp_errstr);
}
msgb_free(msg);
return 0;
@@ -182,7 +183,8 @@ static int cbsp_client_read_cb(struct osmo_stream_cli *cli)
cbsp_rx_decoded(cbc, decoded);
talloc_free(decoded);
} else {
- LOGP(DCBS, LOGL_ERROR, "Unable to decode CBSP %s\n", msgb_hexdump(msg));
+ LOGP(DCBS, LOGL_ERROR, "Unable to decode CBSP %s: '%s'\n",
+ msgb_hexdump(msg), osmo_cbsp_errstr);
}
msgb_free(msg);
return 0;
@@ -253,8 +255,8 @@ int cbsp_tx_decoded(struct bsc_cbc_link *cbc, struct osmo_cbsp_decoded *cbsp)
msg = osmo_cbsp_encode(cbc, cbsp);
if (!msg) {
- LOGP(DCBS, LOGL_ERROR, "Unable to encode CBSP Message Type %s\n",
- get_value_string(cbsp_msg_type_names, cbsp->msg_type));
+ LOGP(DCBS, LOGL_ERROR, "Unable to encode CBSP Message Type %s: %s\n",
+ get_value_string(cbsp_msg_type_names, cbsp->msg_type), osmo_cbsp_errstr);
talloc_free(cbsp);
return -1;
}