mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-ggsn.git
synced 2025-10-23 00:12:08 +00:00
Use gtp_delete_context_req2() everywhere
Replace calls to gtp_delete_context_req() with gtp_delete_context_req2(). Related: OS#2741 Change-Id: Iecc8c5ac45207e7e20129559c4ac7f3c67dfb36a
This commit is contained in:
12
ggsn/ggsn.c
12
ggsn/ggsn.c
@@ -107,7 +107,7 @@ static void pool_close_all_pdp(struct ippool_t *pool)
|
||||
if (!pdp)
|
||||
continue;
|
||||
LOGPPDP(LOGL_DEBUG, pdp, "Sending DELETE PDP CTX due to shutdown\n");
|
||||
gtp_delete_context_req(pdp->gsn, pdp, NULL, 1);
|
||||
gtp_delete_context_req2(pdp->gsn, pdp, NULL, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -972,6 +972,15 @@ static void signal_handler(int s)
|
||||
}
|
||||
}
|
||||
|
||||
/* libgtp callback for confirmations */
|
||||
static int cb_conf(int type, int cause, struct pdp_t *pdp, void *cbp)
|
||||
{
|
||||
switch (type) {
|
||||
case GTP_DELETE_PDP_REQ:
|
||||
return pdp_freepdp(pdp);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Start a given GGSN */
|
||||
int ggsn_start(struct ggsn_ctx *ggsn)
|
||||
@@ -1018,6 +1027,7 @@ int ggsn_start(struct ggsn_ctx *ggsn)
|
||||
gtp_set_cb_data_ind(ggsn->gsn, encaps_tun);
|
||||
gtp_set_cb_delete_context(ggsn->gsn, delete_context);
|
||||
gtp_set_cb_create_context_ind(ggsn->gsn, create_context_ind);
|
||||
gtp_set_cb_conf(ggsn->gsn, cb_conf);
|
||||
|
||||
LOGPGGSN(LOGL_NOTICE, ggsn, "Successfully started\n");
|
||||
ggsn->started = true;
|
||||
|
@@ -1474,6 +1474,7 @@ static int delete_pdp_conf(struct pdp_t *pdp, int cause)
|
||||
{
|
||||
printf("Received delete PDP context response. Cause value: %d\n",
|
||||
cause);
|
||||
pdp_freepdp(pdp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1756,8 +1757,7 @@ int main(int argc, char **argv)
|
||||
for (n = 0; n < options.contexts; n++) {
|
||||
/* Delete context */
|
||||
printf("Disconnecting PDP context #%d\n", n);
|
||||
gtp_delete_context_req(gsn, iparr[n].pdp, NULL,
|
||||
1);
|
||||
gtp_delete_context_req2(gsn, iparr[n].pdp, NULL, 1);
|
||||
if ((options.pinghost.s_addr != 0)
|
||||
&& ntransmitted)
|
||||
ping_finish();
|
||||
|
Reference in New Issue
Block a user