pespin submitted this change.
Improve logging around hnb_context and sctp conn lifecycle
Change-Id: I44c79d86924ead84246b3d4937a6becae5d29185
---
M src/osmo-hnbgw/hnbgw.c
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/osmo-hnbgw/hnbgw.c b/src/osmo-hnbgw/hnbgw.c
index 9c83053..a9fec10 100644
--- a/src/osmo-hnbgw/hnbgw.c
+++ b/src/osmo-hnbgw/hnbgw.c
@@ -256,10 +256,13 @@
msgb_free(msg);
return 0;
} else if (rc < 0) {
- LOGHNB(hnb, DMAIN, LOGL_ERROR, "Error during sctp_recvmsg()\n");
+ LOGHNB(hnb, DMAIN, LOGL_ERROR, "Error during sctp_recvmsg(%s)\n",
+ osmo_sock_get_name2(osmo_stream_srv_get_ofd(conn)->fd));
osmo_stream_srv_destroy(conn);
goto out;
} else if (rc == 0) {
+ LOGHNB(hnb, DMAIN, LOGL_ERROR, "Connection closed sctp_recvmsg(%s) = 0\n",
+ osmo_sock_get_name2(osmo_stream_srv_get_ofd(conn)->fd));
osmo_stream_srv_destroy(conn);
rc = -1;
goto out;
@@ -356,6 +359,8 @@
{
struct hnbgw_context_map *map, *map2;
+ LOGHNB(ctx, DMAIN, LOGL_INFO, "Releasing HNB context\n");
+
/* remove from the list of HNB contexts */
llist_del(&ctx->list);
@@ -371,6 +376,8 @@
ue_context_free_by_hnb(ctx->gw, ctx);
if (ctx->conn) { /* we own a conn, we must free it: */
+ LOGHNB(ctx, DMAIN, LOGL_INFO, "Closing HNB SCTP connection %s\n",
+ osmo_sock_get_name2(osmo_stream_srv_get_ofd(ctx->conn)->fd));
/* Avoid our closed_cb calling hnb_context_release() again: */
osmo_stream_srv_set_data(ctx->conn, NULL);
osmo_stream_srv_destroy(ctx->conn);
To view, visit change 29337. To unsubscribe, or for help writing mail filters, visit settings.