aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2017-09-27 15:08:17 +0200
committerMax <msuraev@sysmocom.de>2017-10-02 08:38:12 +0000
commita3b73e917b653d13d027cff2c95a56bbc1264446 (patch)
tree7bfdc6ed6d40b35e8737e8b19b87a877c421b97e
parent74ef149f06938d610b7d4effc5a7412821095222 (diff)
Use extended logging for PDP contexts
Log additional details (IMSI, NSAPI etc) on PDP context creation/deletion by using appropriate LOGP() wrappers. Change-Id: I91a126952ae75ae9ba1f42aac4d26413384bba5d Related: SYS#3610
-rw-r--r--configure.ac2
-rw-r--r--src/gprs/sgsn_libgtp.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index cd60f0796..c8e23e5f6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -62,7 +62,7 @@ AC_SUBST(osmo_ac_iu)
found_libgtp=yes
-PKG_CHECK_MODULES(LIBGTP, libgtp >= 0.92, , found_libgtp=no)
+PKG_CHECK_MODULES(LIBGTP, libgtp >= 1.0.0, , found_libgtp=no)
AM_CONDITIONAL(HAVE_LIBGTP, test "$found_libgtp" = yes)
AC_SUBST(found_libgtp)
diff --git a/src/gprs/sgsn_libgtp.c b/src/gprs/sgsn_libgtp.c
index 9a002664f..9b8fe16c6 100644
--- a/src/gprs/sgsn_libgtp.c
+++ b/src/gprs/sgsn_libgtp.c
@@ -145,7 +145,6 @@ struct sgsn_pdp_ctx *sgsn_create_pdp_ctx(struct sgsn_ggsn_ctx *ggsn,
const uint8_t *qos;
int rc;
- LOGP(DGPRS, LOGL_ERROR, "Create PDP Context\n");
pctx = sgsn_pdp_ctx_alloc(mmctx, nsapi);
if (!pctx) {
LOGP(DGPRS, LOGL_ERROR, "Couldn't allocate PDP Ctx\n");
@@ -174,6 +173,7 @@ struct sgsn_pdp_ctx *sgsn_create_pdp_ctx(struct sgsn_ggsn_ctx *ggsn,
pdp->selmode = 0xFC | 0x00;
/* IMSI, TEID/TEIC, FLLU/FLLC, TID, NSAPI set in pdp_newpdp */
+ LOGPDPCTXP(LOGL_NOTICE, pctx, "Create PDP Context\n");
/* Put the MSISDN in case we have it */
if (mmctx->subscr && mmctx->subscr->sgsn_data->msisdn_len) {
@@ -635,7 +635,8 @@ static int cb_conf(int type, int cause, struct pdp_t *pdp, void *cbp)
/* Called whenever a PDP context is deleted for any reason */
static int cb_delete_context(struct pdp_t *pdp)
{
- LOGP(DGPRS, LOGL_INFO, "PDP Context was deleted\n");
+ LOGPDPX(DGPRS, LOGL_INFO, pdp, "Context was deleted\n") ;
+
return 0;
}