[PATCH] osmo-ggsn[master]: Move extended PDP logging macro to header

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/.

Max gerrit-no-reply at lists.osmocom.org
Sat Sep 23 12:06:36 UTC 2017


Hello Neels Hofmeyr, Harald Welte, Jenkins Builder,

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

    https://gerrit.osmocom.org/3961

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

Move extended PDP logging macro to header

It might be useful for any user of libgtp who uses libosmocore so let's
make generalized version of it available as part of installable header.

Change-Id: I79aba10ef989384a28f059c30899e65c771ae5e1
Related: SYS#3610
---
M TODO-RELEASE
M ggsn/ggsn.c
M gtp/pdp.h
3 files changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/61/3961/3

diff --git a/TODO-RELEASE b/TODO-RELEASE
index d0852fc..5317459 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
+libgtp		API change	add LOGPDPX() helper to public API.
diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c
index 46850a6..db8b241 100644
--- a/ggsn/ggsn.c
+++ b/ggsn/ggsn.c
@@ -83,8 +83,7 @@
 #define LOGPGGSN(level, ggsn, fmt, args...)			\
 	LOGP(DGGSN, level, "GGSN(%s): " fmt, (ggsn)->cfg.name, ## args)
 
-#define LOGPPDP(level, pdp, fmt, args...)			\
-	LOGP(DGGSN, level, "PDP(%s:%u): " fmt, imsi_gtp2str(&(pdp)->imsi), (pdp)->nsapi, ## args)
+#define LOGPPDP(level, pdp, fmt, args...) LOGPDPX(DGGSN, level, pdp, fmt, ## args)
 
 static int ggsn_tun_fd_cb(struct osmo_fd *fd, unsigned int what);
 static int cb_tun_ind(struct tun_t *tun, void *pack, unsigned len);
diff --git a/gtp/pdp.h b/gtp/pdp.h
index cb98920..65a95ef 100644
--- a/gtp/pdp.h
+++ b/gtp/pdp.h
@@ -15,6 +15,9 @@
 
 struct gsn_t;
 
+#define LOGPDPX(ss, level, pdp, fmt, args...)				\
+	LOGP(ss, level, "PDP(%s:%u): " fmt, imsi_gtp2str(&(pdp)->imsi), (pdp)->nsapi, ## args)
+
 #define PDP_MAX 1024		/* Max number of PDP contexts */
 #define PDP_MAXNSAPI 16		/* Max number of NSAPI */
 

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I79aba10ef989384a28f059c30899e65c771ae5e1
Gerrit-PatchSet: 3
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list