pespin has uploaded this change for review.

View Change

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: I3735728e309f5c0368f6c21edde160c4f86aee01
Depends: libosmo-netif.git 519912781a463fa25bf3c7b18def11076e377fb6
---
M TODO-RELEASE
M src/input/ipaccess.c
2 files changed, 17 insertions(+), 5 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/84/39384/1
diff --git a/TODO-RELEASE b/TODO-RELEASE
index e540591..3500f72 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -1,3 +1,4 @@
+
# When cleaning up this file: bump API version in corresponding Makefile.am and rename corresponding debian/lib*.install
# according to https://osmocom.org/projects/cellular-infrastructure/wiki/Make_a_new_release
# In short: https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html#Updating-version-info
@@ -13,4 +14,5 @@
libosmocore >1.10.0 bigger iofd tx_queue.max_length default value
libosmo-abis API break Remove ipaccess_fd_cb()
libosmo-netif >1.5.1 osmo_ipa_ka_fsm_inst APIs
-libosmo-abis Remove API ipa_proxy_vty_init()
\ No newline at end of file
+libosmo-abis Remove API ipa_proxy_vty_init()
+libosmo-netif >1.5.1 Use osmo_stream_srv_set_segmentation_cb2()
diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c
index 6a7d753..3d61638 100644
--- a/src/input/ipaccess.c
+++ b/src/input/ipaccess.c
@@ -543,6 +543,11 @@
}
}

+static int ipaccess_bsc_conn_segmentation_cb2(struct osmo_stream_srv *conn, struct msgb *msg)
+{
+ return osmo_ipa_segmentation_cb(msg);
+}
+
static int ipaccess_bsc_conn_read_cb(struct osmo_stream_srv *conn, int res, struct msgb *msg)
{
enum ipaccess_proto ipa_proto = osmo_ipa_msgb_cb_proto(msg);
@@ -704,7 +709,7 @@
osmo_stream_srv_set_name(conn, conn_name);
osmo_stream_srv_set_read_cb(conn, ipaccess_bsc_conn_read_cb);
osmo_stream_srv_set_closed_cb(conn, ipaccess_bsc_conn_closed_cb);
- osmo_stream_srv_set_segmentation_cb(conn, osmo_ipa_segmentation_cb);
+ osmo_stream_srv_set_segmentation_cb2(conn, ipaccess_bsc_conn_segmentation_cb2);

/* We use bfd->fd in here for osmo_stats_tcp, and bfd->data to access osmo_stream_srv from e1i_ts. */
bfd = &e1i_ts->driver.ipaccess.fd;
@@ -759,7 +764,7 @@
osmo_stream_srv_set_name(conn, conn_name);
osmo_stream_srv_set_read_cb(conn, ipaccess_bsc_conn_read_cb);
osmo_stream_srv_set_closed_cb(conn, ipaccess_bsc_conn_closed_cb);
- osmo_stream_srv_set_segmentation_cb(conn, osmo_ipa_segmentation_cb);
+ osmo_stream_srv_set_segmentation_cb2(conn, ipaccess_bsc_conn_segmentation_cb2);

/* We use bfd->fd in here for osmo_stats_tcp, and bfd->data to access osmo_stream_srv from e1i_ts. */
bfd = &e1i_ts->driver.ipaccess.fd;
@@ -855,6 +860,11 @@
return -1;
}

+static int ipaccess_bts_segmentation_cb2(struct osmo_stream_cli *cli, struct msgb *msg)
+{
+ return osmo_ipa_segmentation_cb(msg);
+}
+
static int ipaccess_bts_read_cb(struct osmo_stream_cli *cli, int res, struct msgb *msg)
{
enum ipaccess_proto ipa_proto = osmo_ipa_msgb_cb_proto(msg);
@@ -1047,7 +1057,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);
@@ -1125,7 +1135,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);

To view, visit change 39384. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I3735728e309f5c0368f6c21edde160c4f86aee01
Gerrit-Change-Number: 39384
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin@sysmocom.de>