ggsn, sgsnemu: Drop use of no-op deprecated gtp_retrans* APIs

Related: OS#4178
Change-Id: I295b89ee493d230c2550d461fca9602c589d38b5
This commit is contained in:
Pau Espin 2019-08-28 19:44:54 +02:00 committed by pespin
parent c94837c6a4
commit 1bf41e4f36
3 changed files with 2 additions and 34 deletions

View File

@ -739,28 +739,6 @@ static int ggsn_gtp_fd_cb(struct osmo_fd *fd, unsigned int what)
return rc;
}
static void ggsn_gtp_tmr_start(struct ggsn_ctx *ggsn)
{
struct timeval next;
/* Retrieve next retransmission as timeval */
gtp_retranstimeout(ggsn->gsn, &next);
/* re-schedule the timer */
osmo_timer_schedule(&ggsn->gtp_timer, next.tv_sec, next.tv_usec/1000);
}
/* timer callback for libgtp retransmission and ping */
static void ggsn_gtp_tmr_cb(void *data)
{
struct ggsn_ctx *ggsn = data;
/* do all the retransmissions as needed */
gtp_retrans(ggsn->gsn);
ggsn_gtp_tmr_start(ggsn);
}
/* libgtp callback for confirmations */
static int cb_conf(int type, int cause, struct pdp_t *pdp, void *cbp)
{
@ -848,10 +826,6 @@ int ggsn_start(struct ggsn_ctx *ggsn)
rc = osmo_fd_register(&ggsn->gtp_fd1u);
OSMO_ASSERT(rc == 0);
/* Start GTP re-transmission timer */
osmo_timer_setup(&ggsn->gtp_timer, ggsn_gtp_tmr_cb, ggsn);
ggsn_gtp_tmr_start(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);
@ -879,8 +853,6 @@ int ggsn_stop(struct ggsn_ctx *ggsn)
llist_for_each_entry(apn, &ggsn->apn_list, list)
apn_stop(apn);
osmo_timer_del(&ggsn->gtp_timer);
osmo_fd_unregister(&ggsn->gtp_fd1u);
osmo_fd_unregister(&ggsn->gtp_fd1c);
osmo_fd_unregister(&ggsn->gtp_fd0);

View File

@ -138,8 +138,6 @@ struct ggsn_ctx {
struct osmo_fd gtp_fd0;
struct osmo_fd gtp_fd1c;
struct osmo_fd gtp_fd1u;
struct osmo_timer_list gtp_timer;
};
/* ggsn_vty.c */

View File

@ -1801,7 +1801,8 @@ int main(int argc, char **argv)
FD_SET(gsn->fd1c, &fds);
FD_SET(gsn->fd1u, &fds);
gtp_retranstimeout(gsn, &idleTime);
idleTime.tv_sec = 10;
idleTime.tv_usec = 0;
ping_timeout(&idleTime);
if (options.debug)
@ -1817,9 +1818,6 @@ int main(int argc, char **argv)
SYS_ERR(DSGSN, LOGL_ERROR, 0,
"Select returned -1");
break;
case 0:
gtp_retrans(gsn); /* Only retransmit if nothing else */
break;
default:
break;
}