pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-remsim/+/39385?usp=email )
Change subject: Use use new osmo_stream_{cli,srv}_set_segmentation_cb2 ......................................................................
Use use new osmo_stream_{cli,srv}_set_segmentation_cb2
The older API osmo_stream_{cli,srv}_set_segmentation_cb() is now deprecated, use the newer one.
Depends: libosmo-netif.git 519912781a463fa25bf3c7b18def11076e377fb6 Change-Id: I02c55179a144e3bbd1f760f5429e16c6e327111e --- M TODO-RELEASE M src/rspro_client_fsm.c M src/server/rspro_server.c 3 files changed, 13 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/85/39385/1
diff --git a/TODO-RELEASE b/TODO-RELEASE index 730a421..f88e857 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -10,3 +10,4 @@ libosmocore > 1.9.0 working (compiling) gsmtap_inst_fd2() libosmo-simtrace2 >= 0.9.0 required to compile (sim presence polarity) libosmo-netif >1.5.1 osmo_ipa_ka_fsm_inst APIs +libosmo-netif >1.5.1 Use osmo_stream_srv_set_segmentation_cb2() diff --git a/src/rspro_client_fsm.c b/src/rspro_client_fsm.c index d847f3b..c4ff16c 100644 --- a/src/rspro_client_fsm.c +++ b/src/rspro_client_fsm.c @@ -139,6 +139,11 @@ { 0, NULL } };
+static int srvc_ipa_segmentation_cb2(struct osmo_stream_cli *cli, struct msgb *msg) +{ + return osmo_ipa_segmentation_cb(msg); +} + static int srvc_connect_cb(struct osmo_stream_cli *cli) { struct rspro_server_conn *srvc = osmo_stream_cli_get_data(cli); @@ -469,7 +474,7 @@ /* Reconnect is handled by upper layers: */ osmo_stream_cli_set_reconnect_timeout(srvc->conn, -1);
- osmo_stream_cli_set_segmentation_cb(srvc->conn, osmo_ipa_segmentation_cb); + osmo_stream_cli_set_segmentation_cb2(srvc->conn, srvc_ipa_segmentation_cb2); osmo_stream_cli_set_connect_cb(srvc->conn, srvc_connect_cb); osmo_stream_cli_set_disconnect_cb(srvc->conn, srvc_disconnect_cb); osmo_stream_cli_set_read_cb2(srvc->conn, srvc_read_cb); diff --git a/src/server/rspro_server.c b/src/server/rspro_server.c index 1cc1af1..e650910 100644 --- a/src/server/rspro_server.c +++ b/src/server/rspro_server.c @@ -708,6 +708,11 @@ return -1; }
+static int sock_ipa_segmentation_cb2(struct osmo_stream_srv *conn, struct msgb *msg) +{ + return osmo_ipa_segmentation_cb(msg); +} + /* data was received from one of the client connections to the RSPRO socket */ static int sock_read_cb(struct osmo_stream_srv *peer, int res, struct msgb *msg) { @@ -812,7 +817,7 @@ goto out_err; osmo_stream_srv_set_read_cb(conn->peer, sock_read_cb); osmo_stream_srv_set_closed_cb(conn->peer, sock_closed_cb); - osmo_stream_srv_set_segmentation_cb(conn->peer, osmo_ipa_segmentation_cb); + osmo_stream_srv_set_segmentation_cb2(conn->peer, sock_ipa_segmentation_cb2);
/* don't allocate 'fi' as slave from 'conn', as 'fi' needs to survive 'conn' during * teardown */