diff options
author | Harald Welte <laforge@gnumonks.org> | 2017-04-03 22:16:13 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-04-03 22:16:13 +0200 |
commit | 1421f7677597aba316454b34651203220d271425 (patch) | |
tree | ff91340f373a06e7bbfdfde50ffaf23f0696d8c7 | |
parent | de089f2873f9107d3d9cad180d962c5828710afd (diff) |
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
-rw-r--r-- | include/osmocom/sigtran/xua_msg.h | 4 | ||||
-rw-r--r-- | 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 <errno.h> 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 ***********************************************************************/ |