aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs/gb_proxy.c
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-11-22 17:56:36 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2018-11-26 10:49:15 +0000
commit926d54dc7e7e84abfe994fd7f625c943f250f9da (patch)
treeb4ae8a80fe04d8958c12299f94e7e96243d10328 /src/gprs/gb_proxy.c
parentb540c3e983f274ee64706ef39e985ff3d6be0530 (diff)
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
Diffstat (limited to 'src/gprs/gb_proxy.c')
-rw-r--r--src/gprs/gb_proxy.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/gprs/gb_proxy.c b/src/gprs/gb_proxy.c
index 331ebc8cb..0b5758a33 100644
--- a/src/gprs/gb_proxy.c
+++ b/src/gprs/gb_proxy.c
@@ -324,18 +324,12 @@ static void gbproxy_reset_imsi_acquisition(struct gbproxy_link_info* link_info)
/* 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 @@ static int gbproxy_imsi_acquisition(struct gbproxy_peer *peer,
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);