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/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/11351 )
Change subject: rspro_server_conn: Add handle_rx() call-back
......................................................................
rspro_server_conn: Add handle_rx() call-back
This call-back receives all already-decoded RSPRO PDUs from the server.
Change-Id: I5f410aa6071c9a987c2811f22fb2f3ff018b3cc1
---
M src/client.h
M src/remsim_client_fsm.c
2 files changed, 9 insertions(+), 4 deletions(-)
Approvals:
Jenkins Builder: Verified
Harald Welte: Looks good to me, approved
diff --git a/src/client.h b/src/client.h
index d85e647..6918560 100644
--- a/src/client.h
+++ b/src/client.h
@@ -2,6 +2,7 @@
#include <osmocom/core/fsm.h>
#include <osmocom/abis/ipa.h>
+#include <osmocom/rspro/RsproPDU.h>
#include "rspro_util.h"
#include "debug.h"
@@ -23,11 +24,14 @@
SRVC_E_CLIENT_CONN_RES,
};
+struct rspro_server_conn;
+
/* representing a client-side connection to a RSPRO server */
struct rspro_server_conn {
/* state */
struct ipa_client_conn *conn;
struct osmo_fsm_inst *fi;
+ int (*handle_rx)(struct rspro_server_conn *conn, RsproPDU_t *pdu);
/* our own component ID */
struct app_comp_id own_comp_id;
diff --git a/src/remsim_client_fsm.c b/src/remsim_client_fsm.c
index 8711934..0776937 100644
--- a/src/remsim_client_fsm.c
+++ b/src/remsim_client_fsm.c
@@ -269,6 +269,7 @@
struct ipaccess_head *hh = (struct ipaccess_head *) msg->data;
struct ipaccess_head_ext *he = (struct ipaccess_head_ext *) msgb_l2(msg);
struct rspro_server_conn *srvc = conn->data;
+ RsproPDU_t *pdu;
int rc;
if (msgb_length(msg) < sizeof(*hh))
@@ -284,12 +285,12 @@
goto invalid;
printf("Received RSPRO %s\n", msgb_hexdump(msg));
-#if 0
- rc = bankd_handle_msg(srvc, msg);
- msgb_free(msg);
+ pdu = rspro_dec_msg(msg);
+ if (!pdu)
+ goto invalid;
+ rc = srvc->handle_rx(srvc, pdu);
return rc;
-#endif
invalid:
msgb_free(msg);
--
To view, visit https://gerrit.osmocom.org/11351
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I5f410aa6071c9a987c2811f22fb2f3ff018b3cc1
Gerrit-Change-Number: 11351
Gerrit-PatchSet: 3
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190304/0b83f654/attachment.htm>