Changes of Revision 232

libosmocore.spec Changed
x
 
1
@@ -14,13 +14,13 @@
2
 
3
 Name:           libosmocore
4
 Requires: osmocom-master
5
-Version: 1.9.0.4.4332
6
+Version: 1.9.0.5.5285
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.4.4332.tar.xz
13
+Source: libosmocore_1.9.0.5.5285.tar.xz
14
 Source1: rpmlintrc
15
 BuildRequires:  automake >= 1.6
16
 BuildRequires:  libtool >= 2
17
commit_433218a6ef5853f4d40a488d1a1e8b824eab2e7c.txt Deleted
commit_5285d475485f6414ca6afbdeb36c5f4c844517de.txt Added
libosmocore_1.9.0.4.4332.dsc -> libosmocore_1.9.0.5.5285.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.4.4332
6
+Version: 1.9.0.5.5285
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
- c03e5aa2693bd064ebb548d4ccf05322e00a9635 1072524 libosmocore_1.9.0.4.4332.tar.xz
15
+ 9dd88540b0c60f1ecf4c3152c59f87362e17cfea 1073448 libosmocore_1.9.0.5.5285.tar.xz
16
 Checksums-Sha256:
17
- ffeddf04733d32f401d9ff3a42fa04adcef5d892f3762c07ebfce36e93391e08 1072524 libosmocore_1.9.0.4.4332.tar.xz
18
+ ef29443b41511b73b6d97e5b6f38e47fdf4012ec66d9a8fa43600a1945a0a6a3 1073448 libosmocore_1.9.0.5.5285.tar.xz
19
 Files:
20
- 8d5baf81be1a72a8232778a66e27d912 1072524 libosmocore_1.9.0.4.4332.tar.xz
21
+ 648f90bb0ed6c20bccb99cb5fd0fc21c 1073448 libosmocore_1.9.0.5.5285.tar.xz
22
libosmocore_1.9.0.4.4332.tar.xz/.tarball-version -> libosmocore_1.9.0.5.5285.tar.xz/.tarball-version Changed
4
 
1
@@ -1 +1 @@
2
-1.9.0.4-4332
3
+1.9.0.5-5285
4
libosmocore_1.9.0.4.4332.tar.xz/debian/changelog -> libosmocore_1.9.0.5.5285.tar.xz/debian/changelog Changed
12
 
1
@@ -1,8 +1,8 @@
2
-libosmocore (1.9.0.4.4332) unstable; urgency=medium
3
+libosmocore (1.9.0.5.5285) unstable; urgency=medium
4
 
5
   * Automatically generated changelog entry for building the Osmocom master feed
6
 
7
- -- Osmocom OBS scripts <info@osmocom.org>  Sun, 24 Sep 2023 17:48:29 +0000
8
+ -- Osmocom OBS scripts <info@osmocom.org>  Tue, 26 Sep 2023 08:57:21 +0000
9
 
10
 libosmocore (1.9.0) unstable; urgency=medium
11
 
12
libosmocore_1.9.0.4.4332.tar.xz/include/osmocom/gsm/gsm0502.h -> libosmocore_1.9.0.5.5285.tar.xz/include/osmocom/gsm/gsm0502.h Changed
27
 
1
@@ -64,6 +64,25 @@
2
 #define GSM_NBITS_AB_GMSK_TAIL     GSM_NBITS_NB_GMSK_TAIL
3
 #define GSM_NBITS_AB_GMSK_BURST        GSM_NBITS_NB_GMSK_BURST
4
 
5
+/*! Compare the given TDMA FNs, taking the wrapping into account.
6
+ * \paramin fn1 First TDMA Fn value to compare.
7
+ * \paramin fn2 Second TDMA Fn value to compare.
8
+ * \returns similarly to memcmp(), -1 if fn1 goes before fn2;
9
+ *                                  0 if fn1 equals fn2;
10
+ *                                  1 if fn1 goes after fn2. */
11
+static inline int gsm0502_fn_compare(uint32_t fn1, uint32_t fn2)
12
+{
13
+   const uint32_t thresh = GSM_TDMA_HYPERFRAME / 2;
14
+
15
+   if (fn1 == fn2)
16
+       return 0;
17
+   if ((fn1 < fn2 && (fn2 - fn1) < thresh) ||
18
+       (fn1 > fn2 && (fn1 - fn2) > thresh))
19
+       return -1;
20
+
21
+   return 1;
22
+}
23
+
24
 /* Table 5 Clause 7 TS 05.02 */
25
 static inline unsigned int
26
 gsm0502_get_n_pag_blocks(const struct gsm48_control_channel_descr *chan_desc)
27
libosmocore_1.9.0.4.4332.tar.xz/tests/gsm0502/gsm0502_test.c -> libosmocore_1.9.0.5.5285.tar.xz/tests/gsm0502/gsm0502_test.c Changed
30
 
1
@@ -148,8 +148,28 @@
2
    printf("\n");
3
 }
4
 
5
+static void test_gsm0502_fn_compare(void)
6
+{
7
+   OSMO_ASSERT(gsm0502_fn_compare(1337, 1337)      ==  0);
8
+   OSMO_ASSERT(gsm0502_fn_compare(42, 1337)        == -1);
9
+   OSMO_ASSERT(gsm0502_fn_compare(1337, 42)        ==  1);
10
+   OSMO_ASSERT(gsm0502_fn_compare(42, 0)           ==  1);
11
+
12
+   /* 2715642 is very close to the Fn period (GSM_TDMA_HYPERFRAME) */
13
+   OSMO_ASSERT(gsm0502_fn_compare(2715642, 42)     == -1);
14
+   OSMO_ASSERT(gsm0502_fn_compare(42, 2715642)     ==  1);
15
+   OSMO_ASSERT(gsm0502_fn_compare(0, 2715642)      ==  1);
16
+
17
+   /* 1357824 is half of the Fn period (GSM_TDMA_HYPERFRAME) */
18
+   OSMO_ASSERT(gsm0502_fn_compare(1357820, 1357824)    == -1);
19
+   OSMO_ASSERT(gsm0502_fn_compare(1357820, 1357825)    == -1);
20
+   OSMO_ASSERT(gsm0502_fn_compare(1357824, 1357820)    ==  1);
21
+   OSMO_ASSERT(gsm0502_fn_compare(1357825, 1357820)    ==  1);
22
+}
23
+
24
 int main(int argc, char **argv)
25
 {
26
    test_gsm0502_fn_remap();
27
+   test_gsm0502_fn_compare();
28
    return EXIT_SUCCESS;
29
 }
30