Change in ...osmo-ggsn[master]: ggsn, sgsnemu: Drop use of no-op deprecated gtp_retrans* APIs

pespin gerrit-no-reply at lists.osmocom.org
Wed Aug 28 18:09:41 UTC 2019


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/15310


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

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

Related: OS#4178
Change-Id: I295b89ee493d230c2550d461fca9602c589d38b5
---
M ggsn/ggsn.c
M ggsn/ggsn.h
M sgsnemu/sgsnemu.c
3 files changed, 2 insertions(+), 34 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/10/15310/1

diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c
index 7b32bde..27f3b51 100644
--- a/ggsn/ggsn.c
+++ b/ggsn/ggsn.c
@@ -739,28 +739,6 @@
 	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)
 {
@@ -847,10 +825,6 @@
 	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);
@@ -878,8 +852,6 @@
 	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 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 @@
 		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 @@
 				SYS_ERR(DSGSN, LOGL_ERROR, 0,
 					"Select returned -1");
 			break;
-		case 0:
-			gtp_retrans(gsn);	/* Only retransmit if nothing else */
-			break;
 		default:
 			break;
 		}

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/15310
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: I295b89ee493d230c2550d461fca9602c589d38b5
Gerrit-Change-Number: 15310
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190828/5931683e/attachment.html>


More information about the gerrit-log mailing list