From dae5307a574c61921850bbdd937e73640d01f6ca Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 3 Feb 2012 19:48:30 +0100 Subject: misc: abis_nm.c Use the result of ret. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use LOGP(DNM, LOGL_ERROR, ...); for errors in the abis_nm_rx_sw_act_req method. GCC warning: abis_nm.c: In function ‘abis_nm_rx_sw_act_req’: abis_nm.c:412:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] --- openbsc/src/libbsc/abis_nm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/openbsc/src/libbsc/abis_nm.c b/openbsc/src/libbsc/abis_nm.c index a01826bd5..6568b5342 100644 --- a/openbsc/src/libbsc/abis_nm.c +++ b/openbsc/src/libbsc/abis_nm.c @@ -422,12 +422,18 @@ static int abis_nm_rx_sw_act_req(struct msgb *mb) foh->obj_inst.trx_nr, foh->obj_inst.ts_nr, 0, foh->data, oh->length-sizeof(*foh)); + if (ret != 0) { + LOGP(DNM, LOGL_ERROR, + "Sending SW ActReq ACK failed: %d\n", ret); + return ret; + } abis_nm_tlv_parse(&tp, sign_link->trx->bts, foh->data, oh->length-sizeof(*foh)); sw_config = TLVP_VAL(&tp, NM_ATT_SW_CONFIG); sw_config_len = TLVP_LEN(&tp, NM_ATT_SW_CONFIG); if (!TLVP_PRESENT(&tp, NM_ATT_SW_CONFIG)) { - DEBUGP(DNM, "SW config not found! Can't continue.\n"); + LOGP(DNM, LOGL_ERROR, + "SW config not found! Can't continue.\n"); return -EINVAL; } else { DEBUGP(DNM, "Found SW config: %s\n", osmo_hexdump(sw_config, sw_config_len)); -- cgit v1.2.3