more verbose logging in various places

This commit is contained in:
Harald Welte 2015-12-29 19:00:35 +01:00
parent 7bccc98cf8
commit 4928797807
4 changed files with 15 additions and 2 deletions

View File

@ -76,6 +76,9 @@ context_map_alloc_by_hnb(struct hnb_context *hnb, uint32_t rua_ctx_id,
return NULL;
}
LOGP(DMAIN, LOGL_INFO, "Creating new Mapping RUA CTX %p/%u <-> SCU Conn ID %p/%u\n",
hnb, rua_ctx_id, cn_if_new, new_scu_conn_id);
/* alloate a new map entry */
map = talloc_zero(hnb, struct hnbgw_context_map);
map->state = MAP_S_NULL;
@ -109,7 +112,7 @@ context_map_by_cn(struct hnbgw_cnlink *cn, uint32_t scu_conn_id)
* direction, as the RUA=SCCP=SUA connections are always
* established from HNB towards CN. */
LOGP(DMAIN, LOGL_NOTICE, "Unable to resolve map for CN "
"connection ID %u\n", scu_conn_id);
"connection ID %p/%u\n", cn, scu_conn_id);
return NULL;
}

View File

@ -168,6 +168,11 @@ static int rua_to_scu(struct hnb_context *hnb, struct hnbgw_cnlink *cn,
struct hnbgw_context_map *map;
int rc;
if (!cn) {
DEBUGP(DRUA, "CN=NULL, discarding message\n");
return 0;
}
prim = (struct osmo_scu_prim *) msgb_put(msg, sizeof(*prim));
osmo_prim_init(&prim->oph, SCCP_SAP_USER, type, PRIM_OP_REQUEST, msg);

View File

@ -590,7 +590,8 @@
#include <osmocom/core/logging.h>
#include <osmocom/core/utils.h>
#define RANAP_DEBUG(x, args ...) DEBUGP(0, x, ## args)
#include "hnbgw.h"
#define RANAP_DEBUG(x, args ...) DEBUGP(DRANAP, x, ## args)
extern int asn1_xer_print;

View File

@ -192,6 +192,8 @@ int cn_ranap_rx_co(void *ctx, uint8_t *data, size_t len)
if (rc == 0)
cn_ranap_handle_co(ctx, &message);
else
LOGP(DRANAP, LOGL_ERROR, "Not calling cn_ranap_handle_co() due to rc=%d\n", rc);
ASN_STRUCT_FREE(asn_DEF_RANAP_RANAP_PDU, pdu);
@ -325,6 +327,8 @@ int cn_ranap_rx_cl(void *ctx, uint8_t *data, size_t len)
if (rc == 0)
cn_ranap_handle_cl(ctx, &message);
else
LOGP(DRANAP, LOGL_ERROR, "Not calling cn_ranap_handle_cl() due to rc=%d\n", rc);
ASN_STRUCT_FREE(asn_DEF_RANAP_RANAP_PDU, pdu);