Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package osmo-e1d for openSUSE:Factory checked in at 2023-11-02 20:21:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/osmo-e1d (Old) and /work/SRC/openSUSE:Factory/.osmo-e1d.new.17445 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "osmo-e1d" Thu Nov 2 20:21:52 2023 rev:8 rq:1121721 version:0.6.0 Changes: -------- --- /work/SRC/openSUSE:Factory/osmo-e1d/osmo-e1d.changes 2023-05-19 11:56:07.407469796 +0200 +++ /work/SRC/openSUSE:Factory/.osmo-e1d.new.17445/osmo-e1d.changes 2023-11-02 20:22:06.509245500 +0100 @@ -1,0 +2,7 @@ +Wed Nov 1 20:21:39 UTC 2023 - Jan Engelhardt <[email protected]> + +- Update to release 0.6.0 + * proto_clnt: close osmo-e1d control socket on connection loss + * octoi: Add force-send-all-ts mode + +------------------------------------------------------------------- Old: ---- 0.5.0.tar.gz New: ---- 0.6.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ osmo-e1d.spec ++++++ --- /var/tmp/diff_new_pack.PATgBz/_old 2023-11-02 20:22:07.105267431 +0100 +++ /var/tmp/diff_new_pack.PATgBz/_new 2023-11-02 20:22:07.109267578 +0100 @@ -18,7 +18,7 @@ Name: osmo-e1d -Version: 0.5.0 +Version: 0.6.0 Release: 0 Summary: Osmocom E1 Daemon License: GPL-2.0-or-later @@ -29,9 +29,10 @@ BuildRequires: libtool >= 2 BuildRequires: pkg-config >= 0.20 BuildRequires: systemd-rpm-macros -BuildRequires: pkgconfig(libosmocore) >= 1.8.0 -BuildRequires: pkgconfig(libosmousb) >= 1.8.0 -BuildRequires: pkgconfig(libosmovty) >= 1.8.0 +BuildRequires: pkgconfig(libosmocore) >= 1.9.0 +BuildRequires: pkgconfig(libosmousb) >= 1.9.0 +BuildRequires: pkgconfig(libosmovty) >= 1.9.0 +BuildRequires: pkgconfig(libusb-1.0) >= 1.0.21 BuildRequires: pkgconfig(talloc) >= 2.0.1 %description @@ -52,12 +53,12 @@ %description -n libosmo-e1d1 Osmocom E1 Daemon Protocol Library. -%package -n libosmo-octoi1 +%package -n libosmo-octoi2 Summary: Library for the Osmocom Community TDMoIP network License: LGPL-3.0-or-later Group: System/Libraries -%description -n libosmo-octoi1 +%description -n libosmo-octoi2 Library for the Osmocom Community TDMoIP network. %package devel @@ -65,7 +66,7 @@ License: LGPL-3.0-or-later Group: Development/Libraries/C and C++ Requires: libosmo-e1d1 = %version-%release -Requires: libosmo-octoi1 = %version-%release +Requires: libosmo-octoi2 = %version-%release Provides: libosmo-e1d-devel = %version-%release Obsoletes: libosmo-e1d-devel < %version-%release @@ -96,8 +97,8 @@ %post -n libosmo-e1d1 -p /sbin/ldconfig %postun -n libosmo-e1d1 -p /sbin/ldconfig -%post -n libosmo-octoi1 -p /sbin/ldconfig -%postun -n libosmo-octoi1 -p /sbin/ldconfig +%post -n libosmo-octoi2 -p /sbin/ldconfig +%postun -n libosmo-octoi2 -p /sbin/ldconfig %preun %service_del_preun %name.service @@ -124,7 +125,7 @@ %files -n libosmo-e1d1 %_libdir/libosmo-e1d.so.* -%files -n libosmo-octoi1 +%files -n libosmo-octoi2 %_libdir/libosmo-octoi.so.* %files devel ++++++ 0.5.0.tar.gz -> 0.6.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osmo-e1d-0.5.0/configure.ac new/osmo-e1d-0.6.0/configure.ac --- old/osmo-e1d-0.5.0/configure.ac 2023-02-07 11:57:43.000000000 +0100 +++ new/osmo-e1d-0.6.0/configure.ac 2023-09-12 13:30:07.000000000 +0200 @@ -35,9 +35,9 @@ PKG_CHECK_MODULES(TALLOC, [talloc >= 2.0.1]) -PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.8.0) -PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.8.0) -PKG_CHECK_MODULES(LIBOSMOUSB, libosmousb >= 1.8.0) +PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.9.0) +PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.9.0) +PKG_CHECK_MODULES(LIBOSMOUSB, libosmousb >= 1.9.0) PKG_CHECK_MODULES(LIBUSB, libusb-1.0 >= 1.0.21) AC_CONFIG_MACRO_DIR([m4]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osmo-e1d-0.5.0/contrib/osmo-e1d.spec.in new/osmo-e1d-0.6.0/contrib/osmo-e1d.spec.in --- old/osmo-e1d-0.5.0/contrib/osmo-e1d.spec.in 2023-02-07 11:57:43.000000000 +0100 +++ new/osmo-e1d-0.6.0/contrib/osmo-e1d.spec.in 2023-09-12 13:30:07.000000000 +0200 @@ -27,9 +27,9 @@ %if 0%{?suse_version} BuildRequires: systemd-rpm-macros %endif -BuildRequires: pkgconfig(libosmocore) >= 1.8.0 -BuildRequires: pkgconfig(libosmousb) >= 1.8.0 -BuildRequires: pkgconfig(libosmovty) >= 1.8.0 +BuildRequires: pkgconfig(libosmocore) >= 1.9.0 +BuildRequires: pkgconfig(libosmousb) >= 1.9.0 +BuildRequires: pkgconfig(libosmovty) >= 1.9.0 BuildRequires: pkgconfig(talloc) >= 2.0.1 %{?systemd_requires} @@ -51,12 +51,12 @@ %description -n libosmo-e1d1 Osmocom E1 Daemon Protocol Library. -%package -n libosmo-octoi1 +%package -n libosmo-octoi2 Summary: Library for the Osmocom Community TDMoIP network License: LGPL-3.0-or-later Group: System/Libraries -%description -n libosmo-octoi1 +%description -n libosmo-octoi2 Library for the Osmocom Community TDMoIP network. %package devel @@ -64,7 +64,7 @@ License: LGPL-3.0-or-later Group: Development/Libraries/C and C++ Requires: libosmo-e1d1 = %version-%release -Requires: libosmo-octoi1 = %version-%release +Requires: libosmo-octoi2 = %version-%release Provides: libosmo-e1d-devel = %version-%release Obsoletes: libosmo-e1d-devel < %version-%release @@ -93,8 +93,8 @@ %post -n libosmo-e1d1 -p /sbin/ldconfig %postun -n libosmo-e1d1 -p /sbin/ldconfig -%post -n libosmo-octoi1 -p /sbin/ldconfig -%postun -n libosmo-octoi1 -p /sbin/ldconfig +%post -n libosmo-octoi2 -p /sbin/ldconfig +%postun -n libosmo-octoi2 -p /sbin/ldconfig %if 0%{?suse_version} %preun @@ -125,7 +125,7 @@ %files -n libosmo-e1d1 %_libdir/libosmo-e1d.so.* -%files -n libosmo-octoi1 +%files -n libosmo-octoi2 %_libdir/libosmo-octoi.so.* %files devel diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osmo-e1d-0.5.0/contrib/systemd/osmo-e1d.service new/osmo-e1d-0.6.0/contrib/systemd/osmo-e1d.service --- old/osmo-e1d-0.5.0/contrib/systemd/osmo-e1d.service 2023-02-07 11:57:43.000000000 +0100 +++ new/osmo-e1d-0.6.0/contrib/systemd/osmo-e1d.service 2023-09-12 13:30:07.000000000 +0200 @@ -1,6 +1,8 @@ [Unit] Description=Osmocom E1 Interface Daemon Wants=osmo-e1d.service +After=network-online.target +Wants=network-online.target [Service] Type=simple diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osmo-e1d-0.5.0/debian/changelog new/osmo-e1d-0.6.0/debian/changelog --- old/osmo-e1d-0.5.0/debian/changelog 2023-02-07 11:57:43.000000000 +0100 +++ new/osmo-e1d-0.6.0/debian/changelog 2023-09-12 13:30:07.000000000 +0200 @@ -1,3 +1,24 @@ +osmo-e1d (0.6.0) unstable; urgency=medium + + [ Oliver Smith ] + * Run struct_endianness.py + * debian: set compat level to 10 + * systemd: depend on networking-online.target + + [ Philipp Maier ] + * proto_clnt: fix function prototype + * proto_clnt: close osmo-e1d control socket on connection loss + * proto_clnt: use osmo_fd_close to close the socket on connection loss + + [ Harald Welte ] + * Check return code of fcntl() in several plaaces + * proto_srv: Fix file descriptor and memory leak in error paths + * octoi: Fix missing check of osmo_fsm_register() return value + * e1d-ts-pipe: Assert that osmo_fd_register() succeeds + * octoi: Add force-send-all-ts mode + + -- Pau Espin Pedrol <[email protected]> Tue, 12 Sep 2023 13:30:06 +0200 + osmo-e1d (0.5.0) unstable; urgency=medium [ Oliver Smith ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osmo-e1d-0.5.0/debian/compat new/osmo-e1d-0.6.0/debian/compat --- old/osmo-e1d-0.5.0/debian/compat 2023-02-07 11:57:43.000000000 +0100 +++ new/osmo-e1d-0.6.0/debian/compat 2023-09-12 13:30:07.000000000 +0200 @@ -1 +1 @@ -9 +10 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osmo-e1d-0.5.0/debian/control new/osmo-e1d-0.6.0/debian/control --- old/osmo-e1d-0.5.0/debian/control 2023-02-07 11:57:43.000000000 +0100 +++ new/osmo-e1d-0.6.0/debian/control 2023-09-12 13:30:07.000000000 +0200 @@ -1,8 +1,8 @@ Source: osmo-e1d Section: net Priority: extra -Maintainer: Harald Welte <[email protected]> -Build-Depends: debhelper (>=9), +Maintainer: Osmocom team <[email protected]> +Build-Depends: debhelper (>= 10), dh-autoreconf, autotools-dev, autoconf, @@ -10,7 +10,7 @@ libtool, pkg-config, python3-minimal, - libosmocore-dev (>= 1.8.0), + libosmocore-dev (>= 1.9.0), libusb-1.0-0-dev, osmo-gsm-manuals-dev (>= 1.4.0) Standards-Version: 3.9.8 @@ -41,7 +41,7 @@ libosmocore-dev, Description: Development headers for the osmo-e1d library. -Package: libosmo-octoi1 +Package: libosmo-octoi2 Section: libs Architecture: any Multi-Arch: same @@ -54,6 +54,6 @@ Architecture: any Multi-Arch: same Depends: ${misc:Depends}, ${shlibs:Depends}, - libosmo-octoi1 (= ${binary:Version}), + libosmo-octoi2 (= ${binary:Version}), libosmocore-dev, Description: Development headers for the Osmocom Community TDMoIP library. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osmo-e1d-0.5.0/debian/libosmo-octoi1.install new/osmo-e1d-0.6.0/debian/libosmo-octoi1.install --- old/osmo-e1d-0.5.0/debian/libosmo-octoi1.install 2023-02-07 11:57:43.000000000 +0100 +++ new/osmo-e1d-0.6.0/debian/libosmo-octoi1.install 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -usr/lib/*/libosmo-octoi*.so.* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osmo-e1d-0.5.0/debian/libosmo-octoi2.install new/osmo-e1d-0.6.0/debian/libosmo-octoi2.install --- old/osmo-e1d-0.5.0/debian/libosmo-octoi2.install 1970-01-01 01:00:00.000000000 +0100 +++ new/osmo-e1d-0.6.0/debian/libosmo-octoi2.install 2023-09-12 13:30:07.000000000 +0200 @@ -0,0 +1 @@ +usr/lib/*/libosmo-octoi*.so.* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osmo-e1d-0.5.0/include/osmocom/e1d/proto_clnt.h new/osmo-e1d-0.6.0/include/osmocom/e1d/proto_clnt.h --- old/osmo-e1d-0.5.0/include/osmocom/e1d/proto_clnt.h 2023-02-07 11:57:43.000000000 +0100 +++ new/osmo-e1d-0.6.0/include/osmocom/e1d/proto_clnt.h 2023-09-12 13:30:07.000000000 +0200 @@ -30,7 +30,7 @@ struct osmo_e1dp_client; struct osmo_e1dp_client *osmo_e1dp_client_create(void *ctx, const char *path); -void osmo_e1dp_client_destroy(struct osmo_e1dp_client *srv); +void osmo_e1dp_client_destroy(struct osmo_e1dp_client *clnt); int osmo_e1dp_client_intf_query(struct osmo_e1dp_client *clnt, struct osmo_e1dp_intf_info **ii, int *n, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osmo-e1d-0.5.0/include/osmocom/octoi/e1oip_proto.h new/osmo-e1d-0.6.0/include/osmocom/octoi/e1oip_proto.h --- old/osmo-e1d-0.5.0/include/osmocom/octoi/e1oip_proto.h 2023-02-07 11:57:43.000000000 +0100 +++ new/osmo-e1d-0.6.0/include/osmocom/octoi/e1oip_proto.h 2023-09-12 13:30:07.000000000 +0200 @@ -1,9 +1,16 @@ #pragma once +#include <osmocom/core/endian.h> struct e1oip_hdr { +#if OSMO_IS_LITTLE_ENDIAN uint8_t version:4, flags:4; uint8_t msg_type; /* enum e1oip_msgtype */ +#elif OSMO_IS_BIG_ENDIAN +/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianness.py) */ + uint8_t flags:4, version:4; + uint8_t msg_type; +#endif } __attribute__ ((packed)); #define E1OIP_VERSION 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osmo-e1d-0.5.0/include/osmocom/octoi/octoi.h new/osmo-e1d-0.6.0/include/osmocom/octoi/octoi.h --- old/osmo-e1d-0.5.0/include/osmocom/octoi/octoi.h 2023-02-07 11:57:43.000000000 +0100 +++ new/osmo-e1d-0.6.0/include/osmocom/octoi/octoi.h 2023-09-12 13:30:07.000000000 +0200 @@ -22,6 +22,7 @@ char *user_id; /* user ID (IMSI) */ enum octoi_account_mode mode; uint8_t batching_factor; /* E1 frames per UDP packet (Tx) */ + bool force_send_all_ts; /* force transmission of all timeslots */ uint32_t prefill_frame_count; /* FIFO prefill/preseed count (Rx) */ union { struct { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osmo-e1d-0.5.0/src/ctl.c new/osmo-e1d-0.6.0/src/ctl.c --- old/osmo-e1d-0.5.0/src/ctl.c 2023-02-07 11:57:43.000000000 +0100 +++ new/osmo-e1d-0.6.0/src/ctl.c 2023-09-12 13:30:07.000000000 +0200 @@ -163,9 +163,20 @@ } int flags = fcntl(ts->fd, F_GETFL); - fcntl(ts->fd, F_SETFL, flags | O_NONBLOCK); + if (flags < 0) + goto out_err; + + ret = fcntl(ts->fd, F_SETFL, flags | O_NONBLOCK); + if (ret < 0) + goto out_err; return sd[1]; +out_err: + close(sd[0]); + close(sd[1]); + ts->fd = -1; + ts->mode = E1_TS_MODE_OFF; + return -1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osmo-e1d-0.5.0/src/e1d-ts-pipe.c new/osmo-e1d-0.6.0/src/e1d-ts-pipe.c --- old/osmo-e1d-0.5.0/src/e1d-ts-pipe.c 2023-02-07 11:57:43.000000000 +0100 +++ new/osmo-e1d-0.6.0/src/e1d-ts-pipe.c 2023-09-12 13:30:07.000000000 +0200 @@ -219,7 +219,7 @@ exit(2); osmo_fd_setup(&ts_ofd, tsfd, OSMO_FD_READ|OSMO_FD_WRITE, ts_fd_cb, NULL, 0); - osmo_fd_register(&ts_ofd); + OSMO_ASSERT(osmo_fd_register(&ts_ofd) == 0); set_nonblock(infd); set_nonblock(outfd); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osmo-e1d-0.5.0/src/octoi/Makefile.am new/osmo-e1d-0.6.0/src/octoi/Makefile.am --- old/osmo-e1d-0.5.0/src/octoi/Makefile.am 2023-02-07 11:57:43.000000000 +0100 +++ new/osmo-e1d-0.6.0/src/octoi/Makefile.am 2023-09-12 13:30:07.000000000 +0200 @@ -5,7 +5,7 @@ # This is _NOT_ the library release version, it's an API version. # Please read Chapter 6 "Library interface versions" of the libtool # documentation before making any modification -LIBVERSION=1:0:0 +LIBVERSION=2:0:0 lib_LTLIBRARIES = libosmo-octoi.la diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osmo-e1d-0.5.0/src/octoi/e1oip.c new/osmo-e1d-0.6.0/src/octoi/e1oip.c --- old/osmo-e1d-0.5.0/src/octoi/e1oip.c 2023-02-07 11:57:43.000000000 +0100 +++ new/osmo-e1d-0.6.0/src/octoi/e1oip.c 2023-09-12 13:30:07.000000000 +0200 @@ -119,12 +119,16 @@ } iline_stat_set(iline, LINE_STAT_E1oIP_E1O_FIFO, frame_fifo_frames(&iline->e1o.fifo)); - /* then compute the ts_mask */ - for (i = 0, ref_frame = iline->e1o.last_frame; i < n_frames; i++, ref_frame = buf[i-1]) { - /* FIXME: what to do about TS0? */ - for (unsigned int j = 1; j < BYTES_PER_FRAME; j++) { - if (buf[i][j] != ref_frame[j]) - ts_mask |= (1U << j); + if (iline->cfg.force_send_all_ts) { + ts_mask = 0xfffffffe; + } else { + /* then compute the ts_mask */ + for (i = 0, ref_frame = iline->e1o.last_frame; i < n_frames; i++, ref_frame = buf[i-1]) { + /* FIXME: what to do about TS0? */ + for (unsigned int j = 1; j < BYTES_PER_FRAME; j++) { + if (buf[i][j] != ref_frame[j]) + ts_mask |= (1U << j); + } } } eith->ts_mask = htonl(ts_mask); @@ -314,10 +318,11 @@ } void e1oip_line_configure(struct e1oip_line *iline, uint8_t batching_factor, - uint32_t prefill_frame_count) + uint32_t prefill_frame_count, bool force_send_all_ts) { iline->cfg.batching_factor = batching_factor; iline->cfg.prefill_frame_count = prefill_frame_count; + iline->cfg.force_send_all_ts = force_send_all_ts; } void e1oip_line_reset(struct e1oip_line *iline) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osmo-e1d-0.5.0/src/octoi/e1oip.h new/osmo-e1d-0.6.0/src/octoi/e1oip.h --- old/osmo-e1d-0.5.0/src/octoi/e1oip.h 2023-02-07 11:57:43.000000000 +0100 +++ new/osmo-e1d-0.6.0/src/octoi/e1oip.h 2023-09-12 13:30:07.000000000 +0200 @@ -53,6 +53,7 @@ struct { uint8_t batching_factor; uint32_t prefill_frame_count; + bool force_send_all_ts; } cfg; /* E1 originated side (E1->IP) */ @@ -84,7 +85,7 @@ void e1oip_line_set_name(struct e1oip_line *line, const char *name); void e1oip_line_reset(struct e1oip_line *iline); void e1oip_line_configure(struct e1oip_line *iline, uint8_t batching_factor, - uint32_t prefill_frame_count); + uint32_t prefill_frame_count, bool force_send_all_ts); void e1oip_line_destroy(struct e1oip_line *iline); int e1oip_rcvmsg_tdm_data(struct e1oip_line *iline, struct msgb *msg); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osmo-e1d-0.5.0/src/octoi/octoi.c new/osmo-e1d-0.6.0/src/octoi/octoi.c --- old/osmo-e1d-0.5.0/src/octoi/octoi.c 2023-02-07 11:57:43.000000000 +0100 +++ new/osmo-e1d-0.6.0/src/octoi/octoi.c 2023-09-12 13:30:07.000000000 +0200 @@ -75,8 +75,8 @@ { OSMO_ASSERT(!g_octoi); - osmo_fsm_register(&octoi_server_fsm); - osmo_fsm_register(&octoi_client_fsm); + OSMO_ASSERT(osmo_fsm_register(&octoi_server_fsm) == 0); + OSMO_ASSERT(osmo_fsm_register(&octoi_client_fsm) == 0); g_octoi = talloc_zero(ctx, struct octoi_daemon); OSMO_ASSERT(g_octoi); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osmo-e1d-0.5.0/src/octoi/octoi_clnt_fsm.c new/osmo-e1d-0.6.0/src/octoi/octoi_clnt_fsm.c --- old/osmo-e1d-0.5.0/src/octoi/octoi_clnt_fsm.c 2023-02-07 11:57:43.000000000 +0100 +++ new/osmo-e1d-0.6.0/src/octoi/octoi_clnt_fsm.c 2023-09-12 13:30:07.000000000 +0200 @@ -123,7 +123,7 @@ struct clnt_state *st = fi->priv; e1oip_line_configure(st->peer->iline, st->acc->batching_factor, - st->acc->prefill_frame_count); + st->acc->prefill_frame_count, st->acc->force_send_all_ts); /* reset RIFO/FIFO etc. */ e1oip_line_reset(st->peer->iline); iline_ctr_add(st->peer->iline, LINE_CTR_E1oIP_CONNECT_ACCEPT, 1); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osmo-e1d-0.5.0/src/octoi/octoi_clnt_vty.c new/osmo-e1d-0.6.0/src/octoi/octoi_clnt_vty.c --- old/osmo-e1d-0.5.0/src/octoi/octoi_clnt_vty.c 2023-02-07 11:57:43.000000000 +0100 +++ new/osmo-e1d-0.6.0/src/octoi/octoi_clnt_vty.c 2023-09-12 13:30:07.000000000 +0200 @@ -280,6 +280,8 @@ install_element(OCTOI_CLNT_ACCOUNT_NODE, &cfg_account_ice1_line_cmd); install_element(OCTOI_CLNT_ACCOUNT_NODE, &cfg_account_mode_cmd); install_element(OCTOI_CLNT_ACCOUNT_NODE, &cfg_account_batching_factor_cmd); + install_element(OCTOI_CLNT_ACCOUNT_NODE, &cfg_account_force_all_ts_cmd); + install_element(OCTOI_CLNT_ACCOUNT_NODE, &cfg_account_no_force_all_ts_cmd); install_element(OCTOI_CLNT_ACCOUNT_NODE, &cfg_account_prefill_frame_count_cmd); #ifdef HAVE_DAHDI_TRUNKDEV install_element(OCTOI_CLNT_ACCOUNT_NODE, &cfg_account_trunkdev_name_cmd); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osmo-e1d-0.5.0/src/octoi/octoi_srv_fsm.c new/osmo-e1d-0.6.0/src/octoi/octoi_srv_fsm.c --- old/osmo-e1d-0.5.0/src/octoi/octoi_srv_fsm.c 2023-02-07 11:57:43.000000000 +0100 +++ new/osmo-e1d-0.6.0/src/octoi/octoi_srv_fsm.c 2023-09-12 13:30:07.000000000 +0200 @@ -176,7 +176,7 @@ struct srv_state *st = fi->priv; e1oip_line_configure(st->peer->iline, st->acc->batching_factor, - st->acc->prefill_frame_count); + st->acc->prefill_frame_count, st->acc->force_send_all_ts); /* reset RIFO/FIFO etc. */ e1oip_line_reset(st->peer->iline); iline_ctr_add(st->peer->iline, LINE_CTR_E1oIP_CONNECT_ACCEPT, 1); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osmo-e1d-0.5.0/src/octoi/octoi_srv_vty.c new/osmo-e1d-0.6.0/src/octoi/octoi_srv_vty.c --- old/osmo-e1d-0.5.0/src/octoi/octoi_srv_vty.c 2023-02-07 11:57:43.000000000 +0100 +++ new/osmo-e1d-0.6.0/src/octoi/octoi_srv_vty.c 2023-09-12 13:30:07.000000000 +0200 @@ -391,6 +391,26 @@ return CMD_SUCCESS; } +gDEFUN(cfg_account_force_all_ts, cfg_account_force_all_ts_cmd, + "force-all-ts", + "Force transmission of all TS all the time\n") +{ + struct octoi_account *acc = vty->index; + + acc->force_send_all_ts = true; + return CMD_SUCCESS; +} + +gDEFUN(cfg_account_no_force_all_ts, cfg_account_no_force_all_ts_cmd, + "no force-all-ts", + NO_STR "Don't force transmission of all TS all the time\n") +{ + struct octoi_account *acc = vty->index; + + acc->force_send_all_ts = false; + return CMD_SUCCESS; +} + gDEFUN(cfg_account_prefill_frame_count, cfg_account_prefill_frame_count_cmd, "prefill-frame-count <0-8000>", "Number of E1 frames to pre-fill/pre-seed in Rx RIFO\n" @@ -455,6 +475,8 @@ VTY_NEWLINE); if (acc->batching_factor != DEFAULT_BATCHING_FACTOR) vty_out(vty, " batching-factor %u%s", acc->batching_factor, VTY_NEWLINE); + if (acc->force_send_all_ts) + vty_out(vty, " force-all-ts%s", VTY_NEWLINE); if (acc->prefill_frame_count != DEFAULT_PREFILL_FRAME_COUNT) vty_out(vty, " prefill-frame-count %u%s", acc->prefill_frame_count, VTY_NEWLINE); @@ -538,6 +560,8 @@ install_element(OCTOI_ACCOUNT_NODE, &cfg_account_ice1_line_cmd); install_element(OCTOI_ACCOUNT_NODE, &cfg_account_redir_cmd); install_element(OCTOI_ACCOUNT_NODE, &cfg_account_batching_factor_cmd); + install_element(OCTOI_ACCOUNT_NODE, &cfg_account_force_all_ts_cmd); + install_element(OCTOI_ACCOUNT_NODE, &cfg_account_no_force_all_ts_cmd); install_element(OCTOI_ACCOUNT_NODE, &cfg_account_prefill_frame_count_cmd); #ifdef HAVE_DAHDI_TRUNKDEV install_element(OCTOI_ACCOUNT_NODE, &cfg_account_trunkdev_name_cmd); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osmo-e1d-0.5.0/src/octoi/octoi_vty.h new/osmo-e1d-0.6.0/src/octoi/octoi_vty.h --- old/osmo-e1d-0.5.0/src/octoi/octoi_vty.h 2023-02-07 11:57:43.000000000 +0100 +++ new/osmo-e1d-0.6.0/src/octoi/octoi_vty.h 2023-09-12 13:30:07.000000000 +0200 @@ -8,6 +8,8 @@ extern struct cmd_element cfg_account_ice1_serno_cmd; extern struct cmd_element cfg_account_ice1_line_cmd; extern struct cmd_element cfg_account_batching_factor_cmd; +extern struct cmd_element cfg_account_force_all_ts_cmd; +extern struct cmd_element cfg_account_no_force_all_ts_cmd; extern struct cmd_element cfg_account_prefill_frame_count_cmd; extern struct cmd_element cfg_account_trunkdev_name_cmd; extern struct cmd_element cfg_account_trunkdev_line_cmd; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osmo-e1d-0.5.0/src/proto_clnt.c new/osmo-e1d-0.6.0/src/proto_clnt.c --- old/osmo-e1d-0.5.0/src/proto_clnt.c 2023-02-07 11:57:43.000000000 +0100 +++ new/osmo-e1d-0.6.0/src/proto_clnt.c 2023-09-12 13:30:07.000000000 +0200 @@ -88,8 +88,11 @@ struct osmo_e1dp_msg_hdr *hdr; msgb = osmo_e1dp_recv(ofd, NULL); - if (!msgb) + if (!msgb) { + LOGP(DE1D, LOGL_ERROR, "Lost connection with osmo-e1d control socket.\n"); + osmo_fd_close(&clnt->ctl_fd); goto err; + } hdr = msgb_l1(msgb); if ((hdr->type & E1DP_TYPE_MSK) != E1DP_EVT_TYPE) @@ -186,7 +189,12 @@ /* Response */ int flags = fcntl(clnt->ctl_fd.fd, F_GETFL, 0); - fcntl(clnt->ctl_fd.fd, F_SETFL, flags & ~O_NONBLOCK); + if (flags < 0) + return -EIO; + + rc = fcntl(clnt->ctl_fd.fd, F_SETFL, flags & ~O_NONBLOCK); + if (rc < 0) + goto err; while (1) { fd = -1; @@ -204,7 +212,11 @@ msgb_free(msgb); } - fcntl(clnt->ctl_fd.fd, F_SETFL, flags); + rc = fcntl(clnt->ctl_fd.fd, F_SETFL, flags); + if (rc < 0) { + rc = -EIO; + goto err; + } if (msg_hdr->type != (hdr->type | E1DP_RESP_TYPE)) { rc = -EPIPE; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osmo-e1d-0.5.0/src/proto_srv.c new/osmo-e1d-0.6.0/src/proto_srv.c --- old/osmo-e1d-0.5.0/src/proto_srv.c 2023-02-07 11:57:43.000000000 +0100 +++ new/osmo-e1d-0.6.0/src/proto_srv.c 2023-09-12 13:30:07.000000000 +0200 @@ -185,6 +185,7 @@ conn = talloc_zero(srv->ctx, struct osmo_e1dp_server_conn); if (!conn) { LOGP(DE1D, LOGL_ERROR, "Failed to create incoming connection.\n"); + close(rc); return -1; } @@ -197,6 +198,8 @@ if (osmo_fd_register(&conn->fd) != 0) { LOGP(DE1D, LOGL_ERROR, "Failed to register incoming fd.\n"); + close(conn->fd.fd); + talloc_free(conn); return -1; }
