[PATCH] libosmo-sccp[master]: xua: Remove library-internal DXUA log subsystem

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue Apr 4 13:46:31 UTC 2017


Hello Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/2220

to look at the new patch set (#4).

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
---
M include/osmocom/sigtran/xua_msg.h
M src/xua_msg.c
2 files changed, 2 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/20/2220/4

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 @@
 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);
 
@@ -83,8 +81,6 @@
 
 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);
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 @@
 	return msg;
 
 fail:
-	LOGP(DXUA, LOGL_ERROR, "Failed to parse.\n");
 	xua_msg_free(msg);
 	return NULL;
 }
@@ -175,10 +171,8 @@
 	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;
@@ -208,12 +202,6 @@
 	hdr->msg_length = htonl(msgb_l2len(msg));
 	return msg;
 }
-
-void xua_set_log_area(int log_area)
-{
-	DXUA = log_area;
-}
-
 
 /***********************************************************************
  * Message encoding helper functions

-- 
To view, visit https://gerrit.osmocom.org/2220
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iea0d3db34a3674a9c6422b174a879bfdaa25786f
Gerrit-PatchSet: 4
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list