Change in osmo-sgsn[master]: gbproxy: flush_stored_messages: Get rid of msg param

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Mon Nov 26 10:49:18 UTC 2018


Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/11893 )

Change subject: gbproxy: flush_stored_messages: Get rid of msg param
......................................................................

gbproxy: flush_stored_messages: Get rid of msg param

Log line actually makes more sense out of the function where IMSI acq is
resolved. We can then get rid of msg param which may cause confusion and
add complexitiy to code for no good reason.

Change-Id: I6716a260e12a3cf36af0501ce611c6c1e608f537
---
M src/gprs/gb_proxy.c
1 file changed, 5 insertions(+), 7 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/gprs/gb_proxy.c b/src/gprs/gb_proxy.c
index 331ebc8..0b5758a 100644
--- a/src/gprs/gb_proxy.c
+++ b/src/gprs/gb_proxy.c
@@ -324,18 +324,12 @@
 /* Got identity response with IMSI, assuming the request had
  * been generated by the gbproxy */
 static int gbproxy_flush_stored_messages(struct gbproxy_peer *peer,
-					  struct msgb *msg,
 					  time_t now,
 					  struct gbproxy_link_info* link_info)
 {
 	int rc;
 	struct msgb *stored_msg;
 
-	LOGP(DLLC, LOGL_DEBUG,
-	     "NSEI=%d(BSS) IMSI acquisition succeeded, "
-	     "flushing stored messages\n",
-	     msgb_nsei(msg));
-
 	/* Patch and flush stored messages towards the SGSN */
 	while ((stored_msg = msgb_dequeue_count(&link_info->stored_msgs,
 						&link_info->stored_msgs_len))) {
@@ -475,10 +469,14 @@
 			gsm48_hdr_pdisc(parse_ctx->g48_hdr) == GSM48_PDISC_MM_GPRS &&
 			gsm48_hdr_msg_type(parse_ctx->g48_hdr) == GSM48_MT_GMM_ID_RESP;
 
+		LOGP(DLLC, LOGL_DEBUG,
+		     "NSEI=%d(BSS) IMSI acquisition succeeded, "
+		     "flushing stored messages\n",
+		     msgb_nsei(msg));
 		/* The IMSI is now available. If flushing the messages fails,
 		 * then link_info has been deleted and we should return
 		 * immediately. */
-		if (gbproxy_flush_stored_messages(peer, msg, now, link_info) < 0)
+		if (gbproxy_flush_stored_messages(peer, now, link_info) < 0)
 			return 0;
 
 		gbproxy_reset_imsi_acquisition(link_info);

-- 
To view, visit https://gerrit.osmocom.org/11893
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I6716a260e12a3cf36af0501ce611c6c1e608f537
Gerrit-Change-Number: 11893
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181126/3f66cba4/attachment.html>


More information about the gerrit-log mailing list