[PATCH] osmo-ggsn[master]: Move 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
Fri Sep 15 10:45:22 UTC 2017


Review at  https://gerrit.osmocom.org/3961

Move PDP logging macro to header

It might be useful for any user of libgtp who uses libosmocore so let's
make 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, 4 insertions(+), 3 deletions(-)


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

diff --git a/TODO-RELEASE b/TODO-RELEASE
index d0852fc..c1190d2 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 LOGPDP() helper to public API.
diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c
index 46850a6..19b2a8d 100644
--- a/ggsn/ggsn.c
+++ b/ggsn/ggsn.c
@@ -83,9 +83,6 @@
 #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)
-
 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..f27d0ab 100644
--- a/gtp/pdp.h
+++ b/gtp/pdp.h
@@ -15,6 +15,9 @@
 
 struct gsn_t;
 
+#define LOGPPDP(level, pdp, fmt, args...)				\
+	LOGP(DGGSN, 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: newchange
Gerrit-Change-Id: I79aba10ef989384a28f059c30899e65c771ae5e1
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>



More information about the gerrit-log mailing list