From 4881c5c1696e896cf4fdde4008856b082956a8b4 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 3 Apr 2017 22:16:13 +0200 Subject: xua: Remove library-internal DXUA log subsystem We don't really need those thre log messages, and we can thus do away with the library-internal log-subsystem of DXUA. The rest of libosmo-sigtran uses the new globa DL... subsystems anyway Change-Id: Iea0d3db34a3674a9c6422b174a879bfdaa25786f --- include/osmocom/sigtran/xua_msg.h | 4 ---- src/xua_msg.c | 16 ++-------------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/include/osmocom/sigtran/xua_msg.h b/include/osmocom/sigtran/xua_msg.h index 320da6a..e0e1bcf 100644 --- a/include/osmocom/sigtran/xua_msg.h +++ b/include/osmocom/sigtran/xua_msg.h @@ -69,8 +69,6 @@ struct xua_msg_event_map { extern const struct xua_dialect xua_dialect_sua; extern const struct xua_dialect xua_dialect_m3ua; -extern int DXUA; - struct xua_msg *xua_msg_alloc(void); void xua_msg_free(struct xua_msg *msg); @@ -84,8 +82,6 @@ int xua_msg_copy_part(struct xua_msg *xua_out, uint16_t tag_out, struct xua_msg *xua_from_msg(const int version, uint16_t len, uint8_t *data); struct msgb *xua_to_msg(const int version, struct xua_msg *msg); -void xua_set_log_area(int log_area); - int msgb_t16l16vp_put(struct msgb *msg, uint16_t tag, uint16_t len, const uint8_t *data); int msgb_t16l16vp_put_u32(struct msgb *msg, uint16_t tag, uint32_t val); int xua_msg_add_u32(struct xua_msg *xua, uint16_t iei, uint32_t val); diff --git a/src/xua_msg.c b/src/xua_msg.c index 27279ce..cb487c8 100644 --- a/src/xua_msg.c +++ b/src/xua_msg.c @@ -32,17 +32,14 @@ #include static void *tall_xua; -int DXUA = -1; struct xua_msg *xua_msg_alloc(void) { struct xua_msg *msg; msg = talloc_zero(tall_xua, struct xua_msg); - if (!msg) { - LOGP(DXUA, LOGL_ERROR, "Failed to allocate.\n"); + if (!msg) return NULL; - } INIT_LLIST_HEAD(&msg->headers); return msg; @@ -162,7 +159,6 @@ struct xua_msg *xua_from_msg(const int version, uint16_t len, uint8_t *data) return msg; fail: - LOGP(DXUA, LOGL_ERROR, "Failed to parse.\n"); xua_msg_free(msg); return NULL; } @@ -175,10 +171,8 @@ struct msgb *xua_to_msg(const int version, struct xua_msg *xua) uint8_t rest; msg = msgb_alloc_headroom(2048, 512, "xua msg"); - if (!msg) { - LOGP(DXUA, LOGL_ERROR, "Failed to allocate.\n"); + if (!msg) return NULL; - } msg->l2h = msgb_put(msg, sizeof(*hdr)); hdr = (struct xua_common_hdr *) msg->l2h; @@ -209,12 +203,6 @@ struct msgb *xua_to_msg(const int version, struct xua_msg *xua) return msg; } -void xua_set_log_area(int log_area) -{ - DXUA = log_area; -} - - /*********************************************************************** * Message encoding helper functions ***********************************************************************/ -- cgit v1.2.3