pespin has uploaded this change for review.

View Change

Log cn_disconnect.ind cause

Change-Id: I64cd596e55b102924f39264cd2eae7a41f5f3212
---
M TODO-RELEASE
M src/osmo-hnbgw/hnbgw_cn.c
2 files changed, 6 insertions(+), 2 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/63/38563/1
diff --git a/TODO-RELEASE b/TODO-RELEASE
index 0ed7189..8cc6151 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -7,3 +7,4 @@
# If any interfaces have been added since the last public release: c:r:a + 1.
# If any interfaces have been removed or changed since the last public release: c:r:0.
#library what description / commit summary line
+libosmo-sigtran >2.0.0 use API osmo_sua_sccp_cause_name()
\ No newline at end of file
diff --git a/src/osmo-hnbgw/hnbgw_cn.c b/src/osmo-hnbgw/hnbgw_cn.c
index 6618fb9..b984a8e 100644
--- a/src/osmo-hnbgw/hnbgw_cn.c
+++ b/src/osmo-hnbgw/hnbgw_cn.c
@@ -33,6 +33,7 @@
#include <osmocom/gsm/gsm23236.h>

#include <osmocom/sigtran/protocol/m3ua.h>
+#include <osmocom/sigtran/protocol/sua.h>
#include <osmocom/sigtran/sccp_sap.h>
#include <osmocom/sigtran/sccp_helpers.h>

@@ -508,14 +509,16 @@
struct osmo_prim_hdr *oph)
{
struct hnbgw_context_map *map;
+ char cause_buf[128];

map = map_from_conn_id(hsu, param->conn_id, oph);
if (!map || !map->cnlink)
return -ENOENT;

- LOGP(DCN, LOGL_DEBUG, "handle_cn_disc_ind() conn_id=%u responding_addr=%s\n",
+ LOGP(DCN, LOGL_DEBUG, "handle_cn_disc_ind() conn_id=%u responding_addr=%s cause=%s\n",
param->conn_id,
- cnlink_sccp_addr_to_str(map->cnlink, &param->responding_addr));
+ cnlink_sccp_addr_to_str(map->cnlink, &param->responding_addr),
+ osmo_sua_sccp_cause_name(param->cause, cause_buf, sizeof(cause_buf)));

return map_sccp_dispatch(map, MAP_SCCP_EV_RX_RELEASED, oph->msg);
}

To view, visit change 38563. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I64cd596e55b102924f39264cd2eae7a41f5f3212
Gerrit-Change-Number: 38563
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin@sysmocom.de>