gtp: Re-arrange free pdp ctx code in non-teardown scenario
Code modified actually behaves the same, since gtp_freepdp() also calls delete cb, and this way it's more consistent with rest of the code base. Change-Id: I299765816e9d885497110d2e834f7ccdc943052c
This commit is contained in:
parent
8651573632
commit
93dd798a99
27
gtp/gtp.c
27
gtp/gtp.c
|
@ -2421,13 +2421,14 @@ int gtp_delete_context_req(struct gsn_t *gsn, struct pdp_t *pdp, void *cbp,
|
|||
because we don't want user to release its related
|
||||
data and not use it anymore.
|
||||
*/
|
||||
if (gsn->cb_delete_context)
|
||||
gsn->cb_delete_context(pdp);
|
||||
if (pdp == linked_pdp) {
|
||||
linked_pdp->secondary_tei[pdp->nsapi & 0xf0] = 0;
|
||||
linked_pdp->nodata = 1;
|
||||
} else
|
||||
pdp_freepdp(pdp);
|
||||
if (gsn->cb_delete_context)
|
||||
gsn->cb_delete_context(pdp);
|
||||
pdp->secondary_tei[pdp->nsapi & 0xf0] = 0;
|
||||
pdp->nodata = 1;
|
||||
} else {
|
||||
gtp_freepdp(gsn, pdp);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -2510,14 +2511,14 @@ int gtp_delete_pdp_resp(struct gsn_t *gsn, int version,
|
|||
because we don't want user to release its related
|
||||
data and not use it anymore.
|
||||
*/
|
||||
if (gsn->cb_delete_context)
|
||||
gsn->cb_delete_context(pdp);
|
||||
if (pdp == linked_pdp) {
|
||||
linked_pdp->secondary_tei[pdp->nsapi & 0xf0] =
|
||||
0;
|
||||
linked_pdp->nodata = 1;
|
||||
} else
|
||||
pdp_freepdp(pdp);
|
||||
if (gsn->cb_delete_context)
|
||||
gsn->cb_delete_context(pdp);
|
||||
pdp->secondary_tei[pdp->nsapi & 0xf0] = 0;
|
||||
pdp->nodata = 1;
|
||||
} else {
|
||||
gtp_freepdp(gsn, pdp);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* if (cause == GTPCAUSE_ACC_REQ) */
|
||||
|
|
Loading…
Reference in New Issue