pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/39386?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.
Change-Id: I420da09c248fc2e58bfac3e91fe38bddb1de4018 Depends: libosmo-netif.git 519912781a463fa25bf3c7b18def11076e377fb6 --- M TODO-RELEASE M src/ipaccess/ipaccess-config-e1-driver.c M src/osmo-bsc/cbsp_link.c 3 files changed, 19 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/86/39386/1
diff --git a/TODO-RELEASE b/TODO-RELEASE index 193735c..777f047 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -8,3 +8,4 @@ # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line libosmo-sigtran >2.0.1 Use API osmo_ss7_route_get_dest_as(), osmo_ss7_instance_get_id(), osmo_ss7_as_get_asp_protocol() +libosmo-netif >1.5.1 Use osmo_stream_srv_set_segmentation_cb2() diff --git a/src/ipaccess/ipaccess-config-e1-driver.c b/src/ipaccess/ipaccess-config-e1-driver.c index 17a5dde..456a84b 100644 --- a/src/ipaccess/ipaccess-config-e1-driver.c +++ b/src/ipaccess/ipaccess-config-e1-driver.c @@ -353,6 +353,11 @@ return -EBADF; }
+static int ipaccess_bts_segmentation_cb2(struct osmo_stream_cli *cli, struct msgb *msg) +{ + return osmo_ipa_segmentation_cb(msg); +} + static int ipaccess_bts_connect_cb(struct osmo_stream_cli *cli) { struct e1inp_ts *e1i_ts = osmo_stream_cli_get_data(cli); @@ -428,7 +433,7 @@ /* Reconnect is handled by upper layers: */ osmo_stream_cli_set_reconnect_timeout(cli, -1);
- osmo_stream_cli_set_segmentation_cb(cli, osmo_ipa_segmentation_cb); + osmo_stream_cli_set_segmentation_cb2(cli, ipaccess_bts_segmentation_cb2); osmo_stream_cli_set_connect_cb(cli, ipaccess_bts_connect_cb); osmo_stream_cli_set_disconnect_cb(cli, ipaccess_bts_disconnect_cb); osmo_stream_cli_set_read_cb2(cli, ipaccess_bts_read_cb); diff --git a/src/osmo-bsc/cbsp_link.c b/src/osmo-bsc/cbsp_link.c index 3a86ea3..0dc33c3 100644 --- a/src/osmo-bsc/cbsp_link.c +++ b/src/osmo-bsc/cbsp_link.c @@ -62,6 +62,11 @@ return 0; }
+static int cbsp_srv_segmentation_cb2(struct osmo_stream_srv *conn, struct msgb *msg) +{ + return osmo_cbsp_segmentation_cb(msg); +} + static int cbsp_srv_read_cb(struct osmo_stream_srv *conn, int res, struct msgb *msg) { struct bsc_cbc_link *cbc = osmo_stream_srv_get_data(conn); @@ -124,7 +129,7 @@ osmo_stream_srv_set_name(srv, "cbsp"); osmo_stream_srv_set_read_cb(srv, cbsp_srv_read_cb); osmo_stream_srv_set_closed_cb(srv, cbsp_srv_closed_cb); - osmo_stream_srv_set_segmentation_cb(srv, osmo_cbsp_segmentation_cb); + osmo_stream_srv_set_segmentation_cb2(srv, cbsp_srv_segmentation_cb2);
cbc->server.srv = srv; if (cbc->server.sock_name) @@ -166,6 +171,11 @@ return 0; }
+static int cbsp_client_segmentation_cb2(struct osmo_stream_cli *cli, struct msgb *msg) +{ + return osmo_cbsp_segmentation_cb(msg); +} + static int cbsp_client_read_cb(struct osmo_stream_cli *cli, int res, struct msgb *msg) { struct bsc_cbc_link *cbc = osmo_stream_cli_get_data(cli); @@ -247,7 +257,7 @@ osmo_stream_cli_set_connect_cb(cbc->client.cli, cbsp_client_connect_cb); osmo_stream_cli_set_disconnect_cb(cbc->client.cli, cbsp_client_disconnect_cb); osmo_stream_cli_set_read_cb2(cbc->client.cli, cbsp_client_read_cb); - osmo_stream_cli_set_segmentation_cb(cbc->client.cli, osmo_cbsp_segmentation_cb); + osmo_stream_cli_set_segmentation_cb2(cbc->client.cli, cbsp_client_segmentation_cb2); } /* CBC side */ osmo_stream_cli_set_addr(cbc->client.cli, cbc->client.remote_addr.ip);