This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/25933 )
Change subject: smpp_mirror: Factor-out reset of SMPP read state
......................................................................
smpp_mirror: Factor-out reset of SMPP read state
Change-Id: Ib9f210316eaddae19cb74db92b922016864dd786
---
M src/utils/smpp_mirror.c
1 file changed, 9 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/33/25933/1
diff --git a/src/utils/smpp_mirror.c b/src/utils/smpp_mirror.c
index 3053553..883c498 100644
--- a/src/utils/smpp_mirror.c
+++ b/src/utils/smpp_mirror.c
@@ -214,6 +214,14 @@
return rc;
}
+static void esme_read_state_reset(struct esme *esme)
+{
+ esme->read_msg = NULL;
+ esme->read_idx = 0;
+ esme->read_len = 0;
+ esme->read_state = READ_ST_IN_LEN;
+}
+
/* FIXME: merge with smpp_smsc.c */
static int esme_read_cb(struct osmo_fd *ofd)
{
@@ -264,10 +272,7 @@
if (esme->read_idx >= esme->read_len) {
rc = smpp_pdu_rx(esme, esme->read_msg);
- esme->read_msg = NULL;
- esme->read_idx = 0;
- esme->read_len = 0;
- esme->read_state = READ_ST_IN_LEN;
+ esme_read_state_reset(esme);
}
break;
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/25933
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ib9f210316eaddae19cb74db92b922016864dd786
Gerrit-Change-Number: 25933
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211025/65953521/attachment.htm>