aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2015-12-29 19:00:35 +0100
committerHarald Welte <laforge@gnumonks.org>2015-12-29 19:00:35 +0100
commit49287978072f3f777e3954f20e9775c28aee0b8e (patch)
treeb2015e18fc9f2ef787e1b6aadb5472423e5cc1bc /src
parent7bccc98cf88ef304646a523764d102630e3d9a93 (diff)
more verbose logging in various places
Diffstat (limited to 'src')
-rw-r--r--src/context_map.c5
-rw-r--r--src/hnbgw_rua.c5
-rw-r--r--src/ranap_common.h3
-rw-r--r--src/tests/ranap_common_cn.c4
4 files changed, 15 insertions, 2 deletions
diff --git a/src/context_map.c b/src/context_map.c
index cd6cd81..7cfc7e6 100644
--- a/src/context_map.c
+++ b/src/context_map.c
@@ -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;
}
diff --git a/src/hnbgw_rua.c b/src/hnbgw_rua.c
index 961a5c5..9885553 100644
--- a/src/hnbgw_rua.c
+++ b/src/hnbgw_rua.c
@@ -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);
diff --git a/src/ranap_common.h b/src/ranap_common.h
index f3791b0..e30ca2a 100644
--- a/src/ranap_common.h
+++ b/src/ranap_common.h
@@ -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;
diff --git a/src/tests/ranap_common_cn.c b/src/tests/ranap_common_cn.c
index 14a192f..f8b8e6e 100644
--- a/src/tests/ranap_common_cn.c
+++ b/src/tests/ranap_common_cn.c
@@ -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);