Projects
osmocom:master
libosmocore
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 340
View file
libosmocore.spec
Changed
@@ -14,13 +14,13 @@ Name: libosmocore Requires: osmocom-master -Version: 1.9.0.195.dafd +Version: 1.9.0.196.9975 Release: 0 Summary: The Open Source Mobile Communications Core Library License: GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND AGPL-3.0-or-later Group: Productivity/Telephony/Utilities Url: https://osmocom.org/projects/libosmocore/wiki/Libosmocore -Source: libosmocore_1.9.0.195.dafd.tar.xz +Source: libosmocore_1.9.0.196.9975.tar.xz Source1: rpmlintrc BuildRequires: automake >= 1.6 BuildRequires: libtool >= 2
View file
commit_99750d5cae843e01180bc0baeafc06da78d1b0b7.txt
Added
View file
commit_dafdb1181b9f64848caa2265a563444ffcf5e370.txt
Deleted
View file
libosmocore_1.9.0.195.dafd.dsc -> libosmocore_1.9.0.196.9975.dsc
Changed
@@ -2,7 +2,7 @@ Source: libosmocore Binary: libosmocore, libosmocodec4, libosmocodec-doc, libosmocoding0, libosmocoding-doc, libosmocore21, libosmocore-doc, libosmogb14, libosmogb-doc, libosmogsm20, libosmogsm-doc, libosmoisdn0, libosmoisdn-doc, libosmovty13, libosmovty-doc, libosmoctrl0, libosmoctrl-doc, libosmosim2, libosmosim-doc, libosmousb0, libosmousb-doc, libosmocore-dev, libosmocore-utils, libosmocore-dbg Architecture: any all -Version: 1.9.0.195.dafd +Version: 1.9.0.196.9975 Maintainer: Osmocom team <openbsc@lists.osmocom.org> Homepage: https://projects.osmocom.org/projects/libosmocore Standards-Version: 3.9.8 @@ -35,8 +35,8 @@ libosmovty-doc deb doc optional arch=all libosmovty13 deb libs optional arch=any Checksums-Sha1: - 965aa43aecc15ab0c75a9b6689276c59a08c6a9c 1110076 libosmocore_1.9.0.195.dafd.tar.xz + 8c0c45cb13bdb858c0a8699329b4f0cb7f3e7f35 1108904 libosmocore_1.9.0.196.9975.tar.xz Checksums-Sha256: - 887dcc82f94dba9ebaa49ee12509a310bfc253d661a316dcb7239932554c17db 1110076 libosmocore_1.9.0.195.dafd.tar.xz + 278723259753c523e9222918bc8dc26ddaa63e960dce577107cef8ddcd0e364e 1108904 libosmocore_1.9.0.196.9975.tar.xz Files: - 2ad407215c64b5df967f08362b2de0bb 1110076 libosmocore_1.9.0.195.dafd.tar.xz + a3ac1c1d4350fb4b15cbcc94a5525809 1108904 libosmocore_1.9.0.196.9975.tar.xz
View file
libosmocore_1.9.0.195.dafd.tar.xz/.tarball-version -> libosmocore_1.9.0.196.9975.tar.xz/.tarball-version
Changed
@@ -1 +1 @@ -1.9.0.195-dafd +1.9.0.196-9975
View file
libosmocore_1.9.0.195.dafd.tar.xz/debian/changelog -> libosmocore_1.9.0.196.9975.tar.xz/debian/changelog
Changed
@@ -1,8 +1,8 @@ -libosmocore (1.9.0.195.dafd) unstable; urgency=medium +libosmocore (1.9.0.196.9975) unstable; urgency=medium * Automatically generated changelog entry for building the Osmocom master feed - -- Osmocom OBS scripts <info@osmocom.org> Tue, 23 Apr 2024 09:42:45 +0000 + -- Osmocom OBS scripts <info@osmocom.org> Wed, 24 Apr 2024 18:57:12 +0000 libosmocore (1.9.0) unstable; urgency=medium
View file
libosmocore_1.9.0.195.dafd.tar.xz/include/osmocom/core/osmo_io.h -> libosmocore_1.9.0.196.9975.tar.xz/include/osmocom/core/osmo_io.h
Changed
@@ -100,6 +100,7 @@ * \paramin msg message buffer containing the read data. Ownership is transferred to the * call-back, and it must make sure to msgb_free() it eventually! */ void (*read_cb)(struct osmo_io_fd *iofd, int res, struct msgb *msg); + /*! completion call-back function when write issued via osmo_iofd_write_msgb() has completed * on fd. Only valid in OSMO_IO_FD_MODE_READ_WRITE. * \paramin iofd on which a write() has completed. @@ -108,9 +109,14 @@ * call-back; it is automatically freed after the call-back terminates! */ void (*write_cb)(struct osmo_io_fd *iofd, int res, struct msgb *msg); - /*! optional call-back function to segment the data at message boundaries. This is useful when - * message boundaries are to be preserved over a SOCK_STREAM transport socket like TCP. Can - * be NULL for any application not requiring de-segmentation of received data. + + /*! optional call-back function to segment the data at message boundaries. + * \paramin msg message buffer whose data is to be segmented + * \returns See full function description. + * + * This is useful when message boundaries are to be preserved over a SOCK_STREAM transport + * socket like TCP. Can be NULL for any application not requiring de-segmentation of + * received data. * * The call-back needs to return the size of the next message. If it returns * -EAGAIN or a value larger than msgb_length() (message is incomplete) @@ -119,8 +125,26 @@ * If a full message was received (segmentation_cb() returns a value <= msgb_length()) * the msgb will be trimmed to size by osmo_io and forwarded to the read call-back. Any * parsing done to the msgb by segmentation_cb() will be preserved for the read_cb() - * (e.g. setting lxh or msgb->cb). */ + * (e.g. setting lxh or msgb->cb). + * + * Only one (or none) of both segmentation_cb and segmentation_cb2 shall be set. + * Having both set will be considered an error during iofd setup. */ int (*segmentation_cb)(struct msgb *msg); + + /*! optional call-back function to segment the data at message boundaries. + * \paramin iofd handling msg + * \paramin msg message buffer whose data is to be segmented + * \returns See full function description. + * + * Same as segmentation_cb above, with an extra parameter to have access to the iofd and its + * related functionalities (eg data pointer). This is useful for users requiring to store + * global state or access external objects while segmenting. + * + * The provided iofd shall not be freed by the user during the callback. + * + * Only one (or none) of both segmentation_cb and segmentation_cb2 shall be set. + * Having both set will be considered an error during iofd setup. */ + int (*segmentation_cb2)(struct osmo_io_fd *iofd, struct msgb *msg); }; /* mode OSMO_IO_FD_MODE_RECVFROM_SENDTO: */
View file
libosmocore_1.9.0.195.dafd.tar.xz/src/core/osmo_io.c -> libosmocore_1.9.0.196.9975.tar.xz/src/core/osmo_io.c
Changed
@@ -267,7 +267,7 @@ */ static enum iofd_seg_act iofd_handle_segmentation(struct osmo_io_fd *iofd, struct msgb *msg, struct msgb **pending_out) { - int extra_len, received_len; + int extra_len, received_len, expected_len; struct msgb *msg_pending; /* Save the start of message before segmentation_cb (which could change it) */ @@ -275,12 +275,15 @@ received_len = msgb_length(msg); - if (!iofd->io_ops.segmentation_cb) { + if (iofd->io_ops.segmentation_cb2) { + expected_len = iofd->io_ops.segmentation_cb2(iofd, msg); + } else if (iofd->io_ops.segmentation_cb) { + expected_len = iofd->io_ops.segmentation_cb(msg); + } else { *pending_out = NULL; return IOFD_SEG_ACT_HANDLE_ONE; } - int expected_len = iofd->io_ops.segmentation_cb(msg); if (expected_len == -EAGAIN) { goto defer; } else if (expected_len < 0) { @@ -599,6 +602,9 @@ return false; if (ops->recvmsg_cb || ops->sendmsg_cb) return false; + /* Forbid both segementation_cb set, something is wrong: */ + if (ops->segmentation_cb && ops->segmentation_cb2) + return false; break; case OSMO_IO_FD_MODE_RECVFROM_SENDTO: if (ops->read_cb || ops->write_cb)
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.