aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-08-28 19:44:54 +0200
committerpespin <pespin@sysmocom.de>2019-09-05 09:59:52 +0000
commit1bf41e4f36b28325e028a705e88a4544706ab786 (patch)
tree2ebbf25cccb428ee716672474613bd547e8f7d8f
parentc94837c6a401bf0f80791b619a9b4cfbe9160afd (diff)
ggsn, sgsnemu: Drop use of no-op deprecated gtp_retrans* APIsHEADmaster
-rw-r--r--ggsn/ggsn.c28
-rw-r--r--ggsn/ggsn.h2
-rw-r--r--sgsnemu/sgsnemu.c6
3 files changed, 2 insertions, 34 deletions
diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c
index ffa508b..c710984 100644
--- a/ggsn/ggsn.c
+++ b/ggsn/ggsn.c
@@ -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);
diff --git a/ggsn/ggsn.h b/ggsn/ggsn.h
index f23df54..82984a0 100644
--- a/ggsn/ggsn.h
+++ b/ggsn/ggsn.h
@@ -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 */
diff --git a/sgsnemu/sgsnemu.c b/sgsnemu/sgsnemu.c
index 4f1f844..863ea51 100644
--- a/sgsnemu/sgsnemu.c
+++ b/sgsnemu/sgsnemu.c
@@ -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;
}