add some comments regarding the free() / release of pdp contextx
It might be that we're deleting structures instead of properly cleaning up the attached libgtp handles...
This commit is contained in:
parent
45f9171175
commit
7b022eed2d
|
@ -604,6 +604,9 @@ static int gsm48_rx_gmm_id_resp(struct sgsn_mm_ctx *ctx, struct msgb *msg)
|
||||||
ictx->p_tmsi, ctx->p_tmsi);
|
ictx->p_tmsi, ctx->p_tmsi);
|
||||||
gprs_llgmm_assign(ictx->llme, ictx->tlli,
|
gprs_llgmm_assign(ictx->llme, ictx->tlli,
|
||||||
0xffffffff, GPRS_ALGO_GEA0, NULL);
|
0xffffffff, GPRS_ALGO_GEA0, NULL);
|
||||||
|
/* FIXME: this is a hard free, we don't
|
||||||
|
* clean-up any PDP contexts on the
|
||||||
|
* libgtp side */
|
||||||
sgsn_mm_ctx_free(ictx);
|
sgsn_mm_ctx_free(ictx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -173,6 +173,8 @@ struct sgsn_mm_ctx *sgsn_mm_ctx_alloc(uint32_t tlli,
|
||||||
return ctx;
|
return ctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* this is a hard _free_ function, it doesn't clean up the PDP contexts
|
||||||
|
* in libgtp! */
|
||||||
void sgsn_mm_ctx_free(struct sgsn_mm_ctx *mm)
|
void sgsn_mm_ctx_free(struct sgsn_mm_ctx *mm)
|
||||||
{
|
{
|
||||||
struct sgsn_pdp_ctx *pdp, *pdp2;
|
struct sgsn_pdp_ctx *pdp, *pdp2;
|
||||||
|
@ -215,6 +217,7 @@ struct sgsn_pdp_ctx *sgsn_pdp_ctx_by_tid(const struct sgsn_mm_ctx *mm,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* you don't want to use this directly, call sgsn_create_pdp_ctx() */
|
||||||
struct sgsn_pdp_ctx *sgsn_pdp_ctx_alloc(struct sgsn_mm_ctx *mm,
|
struct sgsn_pdp_ctx *sgsn_pdp_ctx_alloc(struct sgsn_mm_ctx *mm,
|
||||||
uint8_t nsapi)
|
uint8_t nsapi)
|
||||||
{
|
{
|
||||||
|
@ -237,6 +240,7 @@ struct sgsn_pdp_ctx *sgsn_pdp_ctx_alloc(struct sgsn_mm_ctx *mm,
|
||||||
return pdp;
|
return pdp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* you probably want to call sgsn_delete_pdp_ctx() instead */
|
||||||
void sgsn_pdp_ctx_free(struct sgsn_pdp_ctx *pdp)
|
void sgsn_pdp_ctx_free(struct sgsn_pdp_ctx *pdp)
|
||||||
{
|
{
|
||||||
rate_ctr_group_free(pdp->ctrg);
|
rate_ctr_group_free(pdp->ctrg);
|
||||||
|
@ -359,6 +363,7 @@ static void drop_one_pdp(struct sgsn_pdp_ctx *pdp)
|
||||||
/* FIXME: GPRS paging in case MS is SUSPENDED */
|
/* FIXME: GPRS paging in case MS is SUSPENDED */
|
||||||
LOGP(DGPRS, LOGL_NOTICE, "Hard-dropping PDP ctx due to GGSN "
|
LOGP(DGPRS, LOGL_NOTICE, "Hard-dropping PDP ctx due to GGSN "
|
||||||
"recovery\n");
|
"recovery\n");
|
||||||
|
/* FIXME: how to tell this to libgtp? */
|
||||||
sgsn_pdp_ctx_free(pdp);
|
sgsn_pdp_ctx_free(pdp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue