Changes of Revision 271

libosmocore.spec Changed
x
 
1
@@ -14,13 +14,13 @@
2
 
3
 Name:           libosmocore
4
 Requires: osmocom-master
5
-Version: 1.9.0.68.846118
6
+Version: 1.9.0.71.8116
7
 Release:        0
8
 Summary:        The Open Source Mobile Communications Core Library
9
 License:        GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND AGPL-3.0-or-later
10
 Group:          Productivity/Telephony/Utilities
11
 Url:            https://osmocom.org/projects/libosmocore/wiki/Libosmocore
12
-Source: libosmocore_1.9.0.68.846118.tar.xz
13
+Source: libosmocore_1.9.0.71.8116.tar.xz
14
 Source1: rpmlintrc
15
 BuildRequires:  automake >= 1.6
16
 BuildRequires:  libtool >= 2
17
commit_811638c00539152bb445ee15ddd2f85c3d1bf12f.txt Added
commit_84611881c9285915724da4933edeb4b0dcd1bb1d.txt Deleted
libosmocore_1.9.0.68.846118.dsc -> libosmocore_1.9.0.71.8116.dsc Changed
22
 
1
@@ -2,7 +2,7 @@
2
 Source: libosmocore
3
 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
4
 Architecture: any all
5
-Version: 1.9.0.68.846118
6
+Version: 1.9.0.71.8116
7
 Maintainer: Osmocom team <openbsc@lists.osmocom.org>
8
 Homepage: https://projects.osmocom.org/projects/libosmocore
9
 Standards-Version: 3.9.8
10
@@ -35,8 +35,8 @@
11
  libosmovty-doc deb doc optional arch=all
12
  libosmovty13 deb libs optional arch=any
13
 Checksums-Sha1:
14
- d2a15a5887252b0b6c63907ab3defc31b60f3f00 1085248 libosmocore_1.9.0.68.846118.tar.xz
15
+ a0dbd6af6f597e956fa8b68107f53099e649c48c 1085052 libosmocore_1.9.0.71.8116.tar.xz
16
 Checksums-Sha256:
17
- f97f025e2b2a1c545e36634f5432d54641390cf28b2798529dda6d9804f23099 1085248 libosmocore_1.9.0.68.846118.tar.xz
18
+ 137f59de3dcdf22307093ae9d596af1392bdb0331972af84a318559bed5c40ba 1085052 libosmocore_1.9.0.71.8116.tar.xz
19
 Files:
20
- 138f5ad9517edc0c8ac8c1b7794f088c 1085248 libosmocore_1.9.0.68.846118.tar.xz
21
+ 05aed56fa7648170b3d1527da93d4e42 1085052 libosmocore_1.9.0.71.8116.tar.xz
22
libosmocore_1.9.0.68.846118.tar.xz/.tarball-version -> libosmocore_1.9.0.71.8116.tar.xz/.tarball-version Changed
4
 
1
@@ -1 +1 @@
2
-1.9.0.68-846118
3
+1.9.0.71-8116
4
libosmocore_1.9.0.68.846118.tar.xz/debian/changelog -> libosmocore_1.9.0.71.8116.tar.xz/debian/changelog Changed
12
 
1
@@ -1,8 +1,8 @@
2
-libosmocore (1.9.0.68.846118) unstable; urgency=medium
3
+libosmocore (1.9.0.71.8116) unstable; urgency=medium
4
 
5
   * Automatically generated changelog entry for building the Osmocom master feed
6
 
7
- -- Osmocom OBS scripts <info@osmocom.org>  Sun, 03 Dec 2023 02:18:19 +0000
8
+ -- Osmocom OBS scripts <info@osmocom.org>  Sun, 03 Dec 2023 02:22:08 +0000
9
 
10
 libosmocore (1.9.0) unstable; urgency=medium
11
 
12
libosmocore_1.9.0.68.846118.tar.xz/include/osmocom/core/soft_uart.h -> libosmocore_1.9.0.71.8116.tar.xz/include/osmocom/core/soft_uart.h Changed
12
 
1
@@ -87,6 +87,10 @@
2
                        const struct osmo_soft_uart_cfg *cfg);
3
 void osmo_soft_uart_free(struct osmo_soft_uart *suart);
4
 int osmo_soft_uart_configure(struct osmo_soft_uart *suart, const struct osmo_soft_uart_cfg *cfg);
5
+
6
+const char *osmo_soft_uart_get_name(const struct osmo_soft_uart *suart);
7
+void osmo_soft_uart_set_name(struct osmo_soft_uart *suart, const char *name);
8
+
9
 int osmo_soft_uart_set_rx(struct osmo_soft_uart *suart, bool enable);
10
 int osmo_soft_uart_set_tx(struct osmo_soft_uart *suart, bool enable);
11
 
12
libosmocore_1.9.0.68.846118.tar.xz/src/core/libosmocore.map -> libosmocore_1.9.0.71.8116.tar.xz/src/core/libosmocore.map Changed
10
 
1
@@ -444,6 +444,8 @@
2
 osmo_soft_uart_alloc;
3
 osmo_soft_uart_free;
4
 osmo_soft_uart_configure;
5
+osmo_soft_uart_get_name;
6
+osmo_soft_uart_set_name;
7
 osmo_soft_uart_set_rx;
8
 osmo_soft_uart_set_tx;
9
 osmo_soft_uart_rx_ubits;
10
libosmocore_1.9.0.68.846118.tar.xz/src/core/soft_uart.c -> libosmocore_1.9.0.71.8116.tar.xz/src/core/soft_uart.c Changed
78
 
1
@@ -111,9 +111,6 @@
2
 /* receive a single bit */
3
 static inline void osmo_uart_rx_bit(struct osmo_soft_uart *suart, const ubit_t bit)
4
 {
5
-   if (!suart->rx.running)
6
-       return;
7
-
8
    switch (suart->rx.flow_state) {
9
    case SUART_FLOW_ST_IDLE:
10
        if (bit == 0) { /* start bit condition */
11
@@ -196,9 +193,12 @@
12
  * \paramin suart soft-UART instance to feed bits into.
13
  * \paramin ubits pointer to the unpacked bits.
14
  * \paramin n_ubits number of unpacked bits to be fed.
15
- * \returns 0 on success; negative on error. */
16
+ * \returns 0 on success; negative on error.
17
+ *          -EAGAIN indicates that the receiver is disabled. */
18
 int osmo_soft_uart_rx_ubits(struct osmo_soft_uart *suart, const ubit_t *ubits, size_t n_ubits)
19
 {
20
+   if (!suart->rx.running)
21
+       return -EAGAIN;
22
    for (size_t i = 0; i < n_ubits; i++)
23
        osmo_uart_rx_bit(suart, ubitsi);
24
    return 0;
25
@@ -213,9 +213,6 @@
26
 {
27
    ubit_t tx_bit = 1;
28
 
29
-   if (!suart->tx.running)
30
-       return tx_bit;
31
-
32
    switch (suart->tx.flow_state) {
33
    case SUART_FLOW_ST_IDLE:
34
        if (msg && msgb_length(msg) > 0) { /* if we have pending data */
35
@@ -280,7 +277,8 @@
36
  * \paramin suart soft-UART instance to pull the bits from.
37
  * \paramout ubits pointer to a buffer where to store pulled bits.
38
  * \paramin n_ubits number of unpacked bits to be pulled.
39
- * \returns number of unpacked bits pulled; negative on error. */
40
+ * \returns 0 on success; negative on error.
41
+ *          -EAGAIN indicates that the transmitter is disabled. */
42
 int osmo_soft_uart_tx_ubits(struct osmo_soft_uart *suart, ubit_t *ubits, size_t n_ubits)
43
 {
44
    const struct osmo_soft_uart_cfg *cfg = &suart->cfg;
45
@@ -290,6 +288,9 @@
46
    if (OSMO_UNLIKELY(n_ubits == 0))
47
        return -EINVAL;
48
 
49
+   if (!suart->tx.running)
50
+       return -EAGAIN;
51
+
52
    /* calculate UART frame size for the effective config */
53
    n_frame_bits = 1 + cfg->num_data_bits + cfg->num_stop_bits;
54
    if (cfg->parity_mode != OSMO_SUART_PARITY_NONE)
55
@@ -396,6 +397,22 @@
56
    return 0;
57
 }
58
 
59
+/*! Get a name for the given soft-UART instance.
60
+ * \paramin suart soft-UART instance to get the name from.
61
+ * \returns name of the given soft-UART instance. */
62
+const char *osmo_soft_uart_get_name(const struct osmo_soft_uart *suart)
63
+{
64
+   return suart->name;
65
+}
66
+
67
+/*! Set a new name for the given soft-UART instance.
68
+ * \paramin suart soft-UART instance to set the name for.
69
+ * \paramin name the new name. */
70
+void osmo_soft_uart_set_name(struct osmo_soft_uart *suart, const char *name)
71
+{
72
+   osmo_talloc_replace_string(suart, (char **)&suart->name, name);
73
+}
74
+
75
 /*! Enable/disable receiver of the given soft-UART.
76
  * \paramin suart soft-UART instance to be re-configured.
77
  * \paramin enable enable/disable state of the receiver.
78
libosmocore_1.9.0.68.846118.tar.xz/tests/soft_uart/soft_uart_test.c -> libosmocore_1.9.0.71.8116.tar.xz/tests/soft_uart/soft_uart_test.c Changed
28
 
1
@@ -16,6 +16,7 @@
2
  *
3
  */
4
 
5
+#include <errno.h>
6
 #include <stdio.h>
7
 #include <stdint.h>
8
 
9
@@ -256,10 +257,18 @@
10
 {
11
    struct osmo_soft_uart_cfg cfg;
12
    struct osmo_soft_uart *suart;
13
+   int rc;
14
 
15
    suart = osmo_soft_uart_alloc(NULL, __func__, &suart_test_default_cfg);
16
    OSMO_ASSERT(suart != NULL);
17
 
18
+   /* expect -EAGAIN when the transmitter is not enabled */
19
+   rc = osmo_soft_uart_tx_ubits(suart, NULL, 42);
20
+   OSMO_ASSERT(rc == -EAGAIN);
21
+   /* expect -EAGAIN when the receiver is not enabled */
22
+   rc = osmo_soft_uart_rx_ubits(suart, NULL, 42);
23
+   OSMO_ASSERT(rc == -EAGAIN);
24
+
25
    osmo_soft_uart_set_tx(suart, true);
26
    osmo_soft_uart_set_rx(suart, true);
27
 
28